src/share/vm/opto/doCall.cpp

changeset 5110
6f3fd5150b67
parent 4447
f1de9dbc914e
child 5763
1b64d46620a3
     1.1 --- a/src/share/vm/opto/doCall.cpp	Mon May 06 19:49:23 2013 -0700
     1.2 +++ b/src/share/vm/opto/doCall.cpp	Wed May 08 15:08:01 2013 -0700
     1.3 @@ -176,9 +176,12 @@
     1.4            // Delay the inlining of this method to give us the
     1.5            // opportunity to perform some high level optimizations
     1.6            // first.
     1.7 -          if (should_delay_inlining(callee, jvms)) {
     1.8 +          if (should_delay_string_inlining(callee, jvms)) {
     1.9              assert(!delayed_forbidden, "strange");
    1.10              return CallGenerator::for_string_late_inline(callee, cg);
    1.11 +          } else if (should_delay_boxing_inlining(callee, jvms)) {
    1.12 +            assert(!delayed_forbidden, "strange");
    1.13 +            return CallGenerator::for_boxing_late_inline(callee, cg);
    1.14            } else if ((should_delay || AlwaysIncrementalInline) && !delayed_forbidden) {
    1.15              return CallGenerator::for_late_inline(callee, cg);
    1.16            }
    1.17 @@ -276,7 +279,7 @@
    1.18  
    1.19  // Return true for methods that shouldn't be inlined early so that
    1.20  // they are easier to analyze and optimize as intrinsics.
    1.21 -bool Compile::should_delay_inlining(ciMethod* call_method, JVMState* jvms) {
    1.22 +bool Compile::should_delay_string_inlining(ciMethod* call_method, JVMState* jvms) {
    1.23    if (has_stringbuilder()) {
    1.24  
    1.25      if ((call_method->holder() == C->env()->StringBuilder_klass() ||
    1.26 @@ -327,6 +330,13 @@
    1.27    return false;
    1.28  }
    1.29  
    1.30 +bool Compile::should_delay_boxing_inlining(ciMethod* call_method, JVMState* jvms) {
    1.31 +  if (eliminate_boxing() && call_method->is_boxing_method()) {
    1.32 +    set_has_boxed_value(true);
    1.33 +    return true;
    1.34 +  }
    1.35 +  return false;
    1.36 +}
    1.37  
    1.38  // uncommon-trap call-sites where callee is unloaded, uninitialized or will not link
    1.39  bool Parse::can_not_compile_call_site(ciMethod *dest_method, ciInstanceKlass* klass) {

mercurial