hotspot/src/share/vm/opto/lcm.cpp
changeset 27454 cbd4c87b9b55
parent 25932 15d133edd8f6
child 28188 08f2d6e29ceb
--- a/hotspot/src/share/vm/opto/lcm.cpp	Sun Nov 02 18:43:38 2014 +0300
+++ b/hotspot/src/share/vm/opto/lcm.cpp	Mon Nov 03 12:02:40 2014 -0800
@@ -464,9 +464,7 @@
         iop == Op_CreateEx ||   // Create-exception must start block
         iop == Op_CheckCastPP
         ) {
-      // select the node n
-      // remove n from worklist and retain the order of remaining nodes
-      worklist.remove((uint)i);
+      worklist.map(i,worklist.pop());
       return n;
     }
 
@@ -552,9 +550,7 @@
   assert(idx >= 0, "index should be set");
   Node *n = worklist[(uint)idx];      // Get the winner
 
-  // select the node n
-  // remove n from worklist and retain the order of remaining nodes
-  worklist.remove((uint)idx);
+  worklist.map((uint)idx, worklist.pop());     // Compress worklist
   return n;
 }