src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
changeset 52711 f480ad035c73
parent 52627 e7d8ea5bfc8f
child 52759 5feec55560f2
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp	Wed Nov 28 15:34:43 2018 +0800
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp	Tue Nov 27 09:35:02 2018 +0100
@@ -996,9 +996,8 @@
   return;
 }
 
-bool ZBarrierSetC2::expand_macro_nodes(PhaseMacroExpand* macro) const {
-  Compile* C = Compile::current();
-  PhaseIterGVN &igvn = macro->igvn();
+bool ZBarrierSetC2::expand_barriers(Compile* C, PhaseIterGVN& igvn) const {
+  PhaseMacroExpand macro(igvn);
   ZBarrierSetC2State* s = state();
   if (s->load_barrier_count() > 0) {
 #ifdef ASSERT
@@ -1018,7 +1017,7 @@
         skipped++;
         continue;
       }
-      expand_loadbarrier_node(macro, n);
+      expand_loadbarrier_node(&macro, n);
       assert(s->load_barrier_count() < load_barrier_count, "must have deleted a node from load barrier list");
       if (C->failing())  return true;
     }
@@ -1027,7 +1026,7 @@
       LoadBarrierNode* n = s->load_barrier_node(load_barrier_count - 1);
       assert(!(igvn.type(n) == Type::TOP || (n->in(0) != NULL && n->in(0)->is_top())), "should have been processed already");
       assert(!n->can_be_eliminated(), "should have been processed already");
-      expand_loadbarrier_node(macro, n);
+      expand_loadbarrier_node(&macro, n);
       assert(s->load_barrier_count() < load_barrier_count, "must have deleted a node from load barrier list");
       if (C->failing())  return true;
     }
@@ -1623,4 +1622,4 @@
       break;
   }
   return false;
-}
\ No newline at end of file
+}