Request for reviews (S): 6658428: C2 doesn't inline java method if corresponding intrinsic failed to inline

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Feb 21 05:57:04 PST 2012


Nils,

You need to put next under "if (cg->is_intrinsic()) {" check:

+    // intrinsic was expecting to optimize. Should always be possible to
+    // get a normal java call that may inline in that case
+    cg = C->call_generator(call_method, vtable_index, call_is_virtual, jvms, 
try_inline, prof_factor(), false);
+    if ((new_jvms = cg->generate(jvms)) == NULL) {


Can you move msg under the following check since it is used only there?:

+    const char* msg = is_virtual() ? "failed to inline (intrinsic, virtual)" : 
"failed to inline (intrinsic)";
      if (jvms->has_method()) {

Thanks,
Vladimir

Nils Eliasson wrote:
>   http://cr.openjdk.java.net/~neliasso/6658428.01/webrev.00/ 
> <http://cr.openjdk.java.net/%7Eneliasso/6658428.01/webrev.00/>
> 
> 6658428: C2 doesn't inline java method if corresponding intrinsic failed 
> to inline.
> 
> Allow intrinsic inline to fallback to plain java inline case. Changing 
> some intrinsics to not be created when they cant be used and adding some 
> print inline changes.
> 
> And I will need someone to submit it.
> 
> Thanks,
> Nils E.
> 


More information about the hotspot-compiler-dev mailing list