8214055: GC/C2 abstraction for phaseX
authorrkennke
Thu, 22 Nov 2018 09:22:54 +0100
changeset 52654 95ce45e0249f
parent 52653 ec92cbf2152b
child 52655 c88468bc7690
8214055: GC/C2 abstraction for phaseX Reviewed-by: kvn, roland
src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
src/hotspot/share/opto/phaseX.cpp
--- a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp	Fri Nov 09 14:08:01 2018 +0100
+++ b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp	Thu Nov 22 09:22:54 2018 +0100
@@ -303,6 +303,10 @@
   virtual bool matcher_find_shared_visit(Matcher* matcher, Matcher::MStack& mstack, Node* n, uint opcode, bool& mem_op, int& mem_addr_idx) const { return false; };
   virtual bool matcher_find_shared_post_visit(Matcher* matcher, Node* n, uint opcode) const { return false; };
   virtual bool matcher_is_store_load_barrier(Node* x, uint xop) const { return false; }
+
+  virtual void igvn_add_users_to_worklist(PhaseIterGVN* igvn, Node* use) const {}
+  virtual void ccp_analyze(PhaseCCP* ccp, Unique_Node_List& worklist, Node* use) const {}
+
 };
 
 #endif // SHARE_GC_SHARED_C2_BARRIERSETC2_HPP
--- a/src/hotspot/share/opto/phaseX.cpp	Fri Nov 09 14:08:01 2018 +0100
+++ b/src/hotspot/share/opto/phaseX.cpp	Thu Nov 22 09:22:54 2018 +0100
@@ -1677,6 +1677,8 @@
         }
       }
     }
+
+    BarrierSet::barrier_set()->barrier_set_c2()->igvn_add_users_to_worklist(this, use);
   }
 }
 
@@ -1827,7 +1829,7 @@
                 for (DUIterator_Fast i3max, i3 = u->fast_outs(i3max); i3 < i3max; i3++) {
                   Node* b = u->fast_out(i3);
                   if (bs->is_gc_barrier_node(b)) {
-                    _worklist.push(b);
+                    worklist.push(b);
                   }
                 }
               }
@@ -1835,6 +1837,8 @@
             }
           }
         }
+
+        BarrierSet::barrier_set()->barrier_set_c2()->ccp_analyze(this, worklist, m);
       }
     }
   }