diff src/share/vm/ci/ciTypeFlow.cpp @ 6824:f13867c41f73

7199742: A lot of C2 OSR compilations of the same method's bci Summary: Don't clone head of OSR loop. Reviewed-by: jrose, twisti
author kvn
date Tue, 02 Oct 2012 14:49:21 -0700
parents da91efe96a93
children 47bc9800972c
line wrap: on
line diff
--- a/src/share/vm/ci/ciTypeFlow.cpp	Tue Oct 02 12:25:13 2012 -0700
+++ b/src/share/vm/ci/ciTypeFlow.cpp	Tue Oct 02 14:49:21 2012 -0700
@@ -2194,6 +2194,10 @@
     if (head->backedge_copy_count() != 0)
       continue;
 
+    // Don't clone head of OSR loop to get correct types in start block.
+    if (is_osr_flow() && head->start() == start_bci())
+      continue;
+
     // check _no_ shared head below us
     Loop* ch;
     for (ch = lp->child(); ch != NULL && ch->head() != head; ch = ch->sibling());