344 }
345 }
346
347 if ((!UseInterpreter || CompileTheWorld) &&
348 is_init_with_ea(callee_method, caller_method, C)) {
349 // Escape Analysis stress testing when running Xcomp or CTW:
350 // inline constructors even if they are not reached.
351 } else if (forced_inline()) {
352 // Inlining was forced by CompilerOracle or ciReplay
353 } else if (profile.count() == 0) {
354 // don't inline unreached call sites
355 set_msg("call site not reached");
356 return false;
357 }
358 }
359
360 if (!C->do_inlining() && InlineAccessors) {
361 set_msg("not an accessor");
362 return false;
363 }
364 if (inline_level() > _max_inline_level) {
365 if (callee_method->force_inline() && inline_level() > MaxForceInlineLevel) {
366 set_msg("MaxForceInlineLevel");
367 return false;
368 }
369 if (!callee_method->force_inline() || !IncrementalInline) {
370 set_msg("inlining too deep");
371 return false;
372 } else if (!C->inlining_incrementally()) {
373 should_delay = true;
374 }
375 }
376
377 // detect direct and indirect recursive inlining
378 {
379 // count the current method and the callee
380 const bool is_compiled_lambda_form = callee_method->is_compiled_lambda_form();
381 int inline_level = 0;
382 if (!is_compiled_lambda_form) {
383 if (method() == callee_method) {
384 inline_level++;
385 }
386 }
387 // count callers of current method and callee
388 Node* callee_argument0 = is_compiled_lambda_form ? jvms->map()->argument(jvms, 0)->uncast() : NULL;
|
344 }
345 }
346
347 if ((!UseInterpreter || CompileTheWorld) &&
348 is_init_with_ea(callee_method, caller_method, C)) {
349 // Escape Analysis stress testing when running Xcomp or CTW:
350 // inline constructors even if they are not reached.
351 } else if (forced_inline()) {
352 // Inlining was forced by CompilerOracle or ciReplay
353 } else if (profile.count() == 0) {
354 // don't inline unreached call sites
355 set_msg("call site not reached");
356 return false;
357 }
358 }
359
360 if (!C->do_inlining() && InlineAccessors) {
361 set_msg("not an accessor");
362 return false;
363 }
364
365 // Limit inlining depth in case inlining is forced or
366 // _max_inline_level was increased to compensate for lambda forms.
367 if (inline_level() > MaxForceInlineLevel) {
368 set_msg("MaxForceInlineLevel");
369 return false;
370 }
371 if (inline_level() > _max_inline_level) {
372 if (!callee_method->force_inline() || !IncrementalInline) {
373 set_msg("inlining too deep");
374 return false;
375 } else if (!C->inlining_incrementally()) {
376 should_delay = true;
377 }
378 }
379
380 // detect direct and indirect recursive inlining
381 {
382 // count the current method and the callee
383 const bool is_compiled_lambda_form = callee_method->is_compiled_lambda_form();
384 int inline_level = 0;
385 if (!is_compiled_lambda_form) {
386 if (method() == callee_method) {
387 inline_level++;
388 }
389 }
390 // count callers of current method and callee
391 Node* callee_argument0 = is_compiled_lambda_form ? jvms->map()->argument(jvms, 0)->uncast() : NULL;
|