Mercurial > hg > graal-jvmci-8
diff src/share/vm/opto/bytecodeInfo.cpp @ 20804:7848fc12602b
Merge with jdk8u40-b25
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Tue, 07 Apr 2015 14:58:49 +0200 |
parents | 52b4284cb496 1de115720e74 |
children | dd9cc155639c |
line wrap: on
line diff
--- a/src/share/vm/opto/bytecodeInfo.cpp Tue Apr 07 11:20:51 2015 +0200 +++ b/src/share/vm/opto/bytecodeInfo.cpp Tue Apr 07 14:58:49 2015 +0200 @@ -107,7 +107,7 @@ int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) { // Allows targeted inlining - if(callee_method->should_inline()) { + if (callee_method->should_inline()) { *wci_result = *(WarmCallInfo::always_hot()); if (C->print_inlining() && Verbose) { CompileTask::print_inline_indent(inline_level()); @@ -118,6 +118,12 @@ return true; } + if (callee_method->force_inline()) { + set_msg("force inline by annotation"); + _forced_inline = true; + return true; + } + #ifndef PRODUCT int inline_depth = inline_level()+1; if (ciReplay::should_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) { @@ -244,6 +250,11 @@ } #endif + if (callee_method->force_inline()) { + set_msg("force inline by annotation"); + return false; + } + // Now perform checks which are heuristic if (is_unboxing_method(callee_method, C)) { @@ -251,12 +262,10 @@ return false; } - if (!callee_method->force_inline()) { - if (callee_method->has_compiled_code() && - callee_method->instructions_size() > InlineSmallCode) { - set_msg("already compiled into a big method"); - return true; - } + if (callee_method->has_compiled_code() && + callee_method->instructions_size() > InlineSmallCode) { + set_msg("already compiled into a big method"); + return true; } // don't inline exception code unless the top method belongs to an @@ -349,7 +358,7 @@ // Escape Analysis stress testing when running Xcomp or CTW: // inline constructors even if they are not reached. } else if (forced_inline()) { - // Inlining was forced by CompilerOracle or ciReplay + // Inlining was forced by CompilerOracle, ciReplay or annotation } else if (profile.count() == 0) { // don't inline unreached call sites set_msg("call site not reached");