8225509: clean_catch_blocks must add preds first
authorneliasso
Tue, 11 Jun 2019 09:27:51 +0200
changeset 55321 ddda023e6f66
parent 55320 670b4794f51e
child 55322 bc5baf205475
8225509: clean_catch_blocks must add preds first Reviewed-by: kvn
src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp	Mon Jun 10 17:11:04 2019 -0700
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp	Tue Jun 11 09:27:51 2019 +0200
@@ -1356,6 +1356,14 @@
   while(nodeStack.length() > 0) {
     Node *n = nodeStack.pop();
 
+    for (uint i = 0; i < n->len(); i++) {
+      if (n->in(i)) {
+        if (!visited.test_set(n->in(i)->_idx)) {
+          nodeStack.push(n->in(i));
+        }
+      }
+    }
+
     bool is_old_node = (n->_idx < new_ids); // don't process nodes that were created during cleanup
     if (n->is_Load() && is_old_node) {
       LoadNode* load = n->isa_Load();
@@ -1364,14 +1372,6 @@
         process_catch_cleanup_candidate(phase, load);
       }
     }
-
-    for (uint i = 0; i < n->len(); i++) {
-      if (n->in(i)) {
-        if (!visited.test_set(n->in(i)->_idx)) {
-          nodeStack.push(n->in(i));
-        }
-      }
-    }
   }
 
   C->print_method(PHASE_CALL_CATCH_CLEANUP, 2);