8227083: ZGC: C2: Generates on_weak barrier for WeakCompareAndSwap
authorstefank
Tue, 02 Jul 2019 12:24:26 +0200
changeset 55554 46579c68f7f4
parent 55553 b9171be3cf2a
child 55555 9a5e9537fe1a
8227083: ZGC: C2: Generates on_weak barrier for WeakCompareAndSwap Reviewed-by: neliasso, eosterlund
src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp	Tue Jul 02 12:10:18 2019 +0200
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp	Tue Jul 02 12:24:26 2019 +0200
@@ -1234,7 +1234,6 @@
   Compile *C = phase->C;
   PhaseIterGVN &igvn = phase->igvn();
   LoadStoreNode* zclone = NULL;
-  bool is_weak = false;
 
   Node *in_ctrl = old_node->in(MemNode::Control);
   Node *in_mem  = old_node->in(MemNode::Memory);
@@ -1254,7 +1253,6 @@
       if (can_simplify_cas(old_node)) {
         break;
       }
-      is_weak  = true;
       zclone = new ZWeakCompareAndSwapPNode(in_ctrl, in_mem, in_adr, in_val, old_node->in(LoadStoreConditionalNode::ExpectedIn),
               ((CompareAndSwapNode*)old_node)->order());
       adr_type = TypePtr::BOTTOM;
@@ -1285,7 +1283,7 @@
     igvn.register_new_node_with_optimizer(load);
     igvn.replace_node(old_node, zclone);
 
-    Node *barrier = new LoadBarrierNode(C, NULL, in_mem, load, in_adr, is_weak);
+    Node *barrier = new LoadBarrierNode(C, NULL, in_mem, load, in_adr, false /* weak */);
     Node *barrier_val = new ProjNode(barrier, LoadBarrierNode::Oop);
     Node *barrier_ctrl = new ProjNode(barrier, LoadBarrierNode::Control);