diff src/share/vm/opto/compile.cpp @ 22985:eb8b5cc64669

8063137: Never-taken branches should be pruned when GWT LambdaForms are shared Reviewed-by: jrose, kvn
author vlivanov
date Thu, 29 Jan 2015 10:25:59 -0800
parents ddce0b7cee93
children bf41eee321e5
line wrap: on
line diff
--- a/src/share/vm/opto/compile.cpp	Tue Apr 28 00:37:33 2015 -0700
+++ b/src/share/vm/opto/compile.cpp	Thu Jan 29 10:25:59 2015 -0800
@@ -3075,6 +3075,7 @@
   default:
     assert( !n->is_Call(), "" );
     assert( !n->is_Mem(), "" );
+    assert( nop != Op_ProfileBoolean, "should be eliminated during IGVN");
     break;
   }
 
@@ -3291,6 +3292,9 @@
 bool Compile::too_many_traps(ciMethod* method,
                              int bci,
                              Deoptimization::DeoptReason reason) {
+  if (method->has_injected_profile()) {
+    return false;
+  }
   ciMethodData* md = method->method_data();
   if (md->is_empty()) {
     // Assume the trap has not occurred, or that it occurred only
@@ -3340,6 +3344,9 @@
 bool Compile::too_many_recompiles(ciMethod* method,
                                   int bci,
                                   Deoptimization::DeoptReason reason) {
+  if (method->has_injected_profile()) {
+    return false;
+  }
   ciMethodData* md = method->method_data();
   if (md->is_empty()) {
     // Assume the trap has not occurred, or that it occurred only