3754
3755 // Proper inlining of methods with jsrs requires a little more work.
3756 if (callee->has_jsrs() ) INLINE_BAILOUT("jsrs not handled properly by inliner yet");
3757
3758 // When SSE2 is used on intel, then no special handling is needed
3759 // for strictfp because the enum-constant is fixed at compile time,
3760 // the check for UseSSE2 is needed here
3761 if (strict_fp_requires_explicit_rounding && UseSSE < 2 && method()->is_strict() != callee->is_strict()) {
3762 INLINE_BAILOUT("caller and callee have different strict fp requirements");
3763 }
3764
3765 if (is_profiling() && !callee->ensure_method_data()) {
3766 INLINE_BAILOUT("mdo allocation failed");
3767 }
3768
3769 // now perform tests that are based on flag settings
3770 if (callee->force_inline()) {
3771 if (inline_level() > MaxForceInlineLevel) INLINE_BAILOUT("MaxForceInlineLevel");
3772 print_inlining(callee, "force inline by annotation");
3773 } else if (callee->should_inline()) {
3774 print_inlining(callee, "force inline by CompileOracle");
3775 } else {
3776 // use heuristic controls on inlining
3777 if (inline_level() > MaxInlineLevel ) INLINE_BAILOUT("inlining too deep");
3778 if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("recursive inlining too deep");
3779 if (callee->code_size_for_inlining() > max_inline_size() ) INLINE_BAILOUT("callee is too large");
3780
3781 // don't inline throwable methods unless the inlining tree is rooted in a throwable class
3782 if (callee->name() == ciSymbol::object_initializer_name() &&
3783 callee->holder()->is_subclass_of(ciEnv::current()->Throwable_klass())) {
3784 // Throwable constructor call
3785 IRScope* top = scope();
3786 while (top->caller() != NULL) {
3787 top = top->caller();
3788 }
3789 if (!top->method()->holder()->is_subclass_of(ciEnv::current()->Throwable_klass())) {
3790 INLINE_BAILOUT("don't inline Throwable constructors");
3791 }
3792 }
3793
|
3754
3755 // Proper inlining of methods with jsrs requires a little more work.
3756 if (callee->has_jsrs() ) INLINE_BAILOUT("jsrs not handled properly by inliner yet");
3757
3758 // When SSE2 is used on intel, then no special handling is needed
3759 // for strictfp because the enum-constant is fixed at compile time,
3760 // the check for UseSSE2 is needed here
3761 if (strict_fp_requires_explicit_rounding && UseSSE < 2 && method()->is_strict() != callee->is_strict()) {
3762 INLINE_BAILOUT("caller and callee have different strict fp requirements");
3763 }
3764
3765 if (is_profiling() && !callee->ensure_method_data()) {
3766 INLINE_BAILOUT("mdo allocation failed");
3767 }
3768
3769 // now perform tests that are based on flag settings
3770 if (callee->force_inline()) {
3771 if (inline_level() > MaxForceInlineLevel) INLINE_BAILOUT("MaxForceInlineLevel");
3772 print_inlining(callee, "force inline by annotation");
3773 } else if (callee->should_inline()) {
3774 if (inline_level() > MaxForceInlineLevel) INLINE_BAILOUT("MaxForceInlineLevel");
3775 if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("recursive inlining too deep");
3776 print_inlining(callee, "force inline by CompileOracle");
3777 } else {
3778 // use heuristic controls on inlining
3779 if (inline_level() > MaxInlineLevel ) INLINE_BAILOUT("inlining too deep");
3780 if (recursive_inline_level(callee) > MaxRecursiveInlineLevel) INLINE_BAILOUT("recursive inlining too deep");
3781 if (callee->code_size_for_inlining() > max_inline_size() ) INLINE_BAILOUT("callee is too large");
3782
3783 // don't inline throwable methods unless the inlining tree is rooted in a throwable class
3784 if (callee->name() == ciSymbol::object_initializer_name() &&
3785 callee->holder()->is_subclass_of(ciEnv::current()->Throwable_klass())) {
3786 // Throwable constructor call
3787 IRScope* top = scope();
3788 while (top->caller() != NULL) {
3789 top = top->caller();
3790 }
3791 if (!top->method()->holder()->is_subclass_of(ciEnv::current()->Throwable_klass())) {
3792 INLINE_BAILOUT("don't inline Throwable constructors");
3793 }
3794 }
3795
|