src/share/vm/opto/bytecodeInfo.cpp

changeset 7182
1de115720e74
parent 6709
73c839dda17e
child 7535
7ae4e26cb1e0
child 7854
e8260b6328fb
     1.1 --- a/src/share/vm/opto/bytecodeInfo.cpp	Thu May 29 09:41:07 2014 +0000
     1.2 +++ b/src/share/vm/opto/bytecodeInfo.cpp	Mon Jul 14 03:24:35 2014 -0700
     1.3 @@ -107,7 +107,7 @@
     1.4                                 int caller_bci, ciCallProfile& profile,
     1.5                                 WarmCallInfo* wci_result) {
     1.6    // Allows targeted inlining
     1.7 -  if(callee_method->should_inline()) {
     1.8 +  if (callee_method->should_inline()) {
     1.9      *wci_result = *(WarmCallInfo::always_hot());
    1.10      if (C->print_inlining() && Verbose) {
    1.11        CompileTask::print_inline_indent(inline_level());
    1.12 @@ -118,6 +118,12 @@
    1.13      return true;
    1.14    }
    1.15  
    1.16 +  if (callee_method->force_inline()) {
    1.17 +      set_msg("force inline by annotation");
    1.18 +      _forced_inline = true;
    1.19 +      return true;
    1.20 +  }
    1.21 +
    1.22  #ifndef PRODUCT
    1.23    int inline_depth = inline_level()+1;
    1.24    if (ciReplay::should_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) {
    1.25 @@ -244,6 +250,11 @@
    1.26    }
    1.27  #endif
    1.28  
    1.29 +  if (callee_method->force_inline()) {
    1.30 +    set_msg("force inline by annotation");
    1.31 +    return false;
    1.32 +  }
    1.33 +
    1.34    // Now perform checks which are heuristic
    1.35  
    1.36    if (is_unboxing_method(callee_method, C)) {
    1.37 @@ -251,12 +262,10 @@
    1.38      return false;
    1.39    }
    1.40  
    1.41 -  if (!callee_method->force_inline()) {
    1.42 -    if (callee_method->has_compiled_code() &&
    1.43 -        callee_method->instructions_size() > InlineSmallCode) {
    1.44 -      set_msg("already compiled into a big method");
    1.45 -      return true;
    1.46 -    }
    1.47 +  if (callee_method->has_compiled_code() &&
    1.48 +      callee_method->instructions_size() > InlineSmallCode) {
    1.49 +    set_msg("already compiled into a big method");
    1.50 +    return true;
    1.51    }
    1.52  
    1.53    // don't inline exception code unless the top method belongs to an
    1.54 @@ -349,7 +358,7 @@
    1.55        // Escape Analysis stress testing when running Xcomp or CTW:
    1.56        // inline constructors even if they are not reached.
    1.57      } else if (forced_inline()) {
    1.58 -      // Inlining was forced by CompilerOracle or ciReplay
    1.59 +      // Inlining was forced by CompilerOracle, ciReplay or annotation
    1.60      } else if (profile.count() == 0) {
    1.61        // don't inline unreached call sites
    1.62         set_msg("call site not reached");

mercurial