< prev index next >

src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.hpp

Print this page
rev 52049 : JDK11-only: Use WB-based acmp barrier


  98     return true;
  99   };
 100 
 101   static bool needs_barrier(PhaseGVN* phase, ShenandoahBarrierNode* orig, Node* n, Node* rb_mem, bool allow_fromspace);
 102 
 103 #ifdef ASSERT
 104   static void report_verify_failure(const char* msg, Node* n1 = NULL, Node* n2 = NULL);
 105   static void verify(RootNode* root);
 106   static void verify_raw_mem(RootNode* root);
 107 #endif
 108 #ifndef PRODUCT
 109   virtual void dump_spec(outputStream *st) const;
 110 #endif
 111 
 112   // protected:
 113   static Node* dom_mem(Node* mem, Node*& mem_ctrl, Node* n, Node* rep_ctrl, int alias, PhaseIdealLoop* phase);
 114   static Node* dom_mem(Node* mem, Node* ctrl, int alias, Node*& mem_ctrl, PhaseIdealLoop* phase);
 115   static bool is_dominator(Node *d_c, Node *n_c, Node* d, Node* n, PhaseIdealLoop* phase);
 116   static bool is_dominator_same_ctrl(Node* c, Node* d, Node* n, PhaseIdealLoop* phase);
 117   static Node* no_branches(Node* c, Node* dom, bool allow_one_proj, PhaseIdealLoop* phase);
 118   static void do_cmpp_if(GraphKit& kit, Node*& taken_branch, Node*& untaken_branch, Node*& taken_memory, Node*& untaken_memory);
 119 
 120 protected:
 121   uint hash() const;
 122   uint cmp(const Node& n) const;
 123   uint size_of() const;
 124 
 125 private:
 126   static bool needs_barrier_impl(PhaseGVN* phase, ShenandoahBarrierNode* orig, Node* n, Node* rb_mem, bool allow_fromspace, Unique_Node_List &visited);
 127 
 128   static bool dominates_memory(PhaseGVN* phase, Node* b1, Node* b2, bool linear);
 129   static bool dominates_memory_impl(PhaseGVN* phase, Node* b1, Node* b2, Node* current, bool linear);
 130 };
 131 
 132 class ShenandoahReadBarrierNode : public ShenandoahBarrierNode {
 133 public:
 134   ShenandoahReadBarrierNode(Node* ctrl, Node* mem, Node* obj)
 135     : ShenandoahBarrierNode(ctrl, mem, obj, true) {
 136     assert(UseShenandoahGC && (ShenandoahReadBarrier || ShenandoahStoreValReadBarrier ||
 137                                ShenandoahWriteBarrier || ShenandoahAcmpBarrier),
 138            "should be enabled");




  98     return true;
  99   };
 100 
 101   static bool needs_barrier(PhaseGVN* phase, ShenandoahBarrierNode* orig, Node* n, Node* rb_mem, bool allow_fromspace);
 102 
 103 #ifdef ASSERT
 104   static void report_verify_failure(const char* msg, Node* n1 = NULL, Node* n2 = NULL);
 105   static void verify(RootNode* root);
 106   static void verify_raw_mem(RootNode* root);
 107 #endif
 108 #ifndef PRODUCT
 109   virtual void dump_spec(outputStream *st) const;
 110 #endif
 111 
 112   // protected:
 113   static Node* dom_mem(Node* mem, Node*& mem_ctrl, Node* n, Node* rep_ctrl, int alias, PhaseIdealLoop* phase);
 114   static Node* dom_mem(Node* mem, Node* ctrl, int alias, Node*& mem_ctrl, PhaseIdealLoop* phase);
 115   static bool is_dominator(Node *d_c, Node *n_c, Node* d, Node* n, PhaseIdealLoop* phase);
 116   static bool is_dominator_same_ctrl(Node* c, Node* d, Node* n, PhaseIdealLoop* phase);
 117   static Node* no_branches(Node* c, Node* dom, bool allow_one_proj, PhaseIdealLoop* phase);

 118 
 119 protected:
 120   uint hash() const;
 121   uint cmp(const Node& n) const;
 122   uint size_of() const;
 123 
 124 private:
 125   static bool needs_barrier_impl(PhaseGVN* phase, ShenandoahBarrierNode* orig, Node* n, Node* rb_mem, bool allow_fromspace, Unique_Node_List &visited);
 126 
 127   static bool dominates_memory(PhaseGVN* phase, Node* b1, Node* b2, bool linear);
 128   static bool dominates_memory_impl(PhaseGVN* phase, Node* b1, Node* b2, Node* current, bool linear);
 129 };
 130 
 131 class ShenandoahReadBarrierNode : public ShenandoahBarrierNode {
 132 public:
 133   ShenandoahReadBarrierNode(Node* ctrl, Node* mem, Node* obj)
 134     : ShenandoahBarrierNode(ctrl, mem, obj, true) {
 135     assert(UseShenandoahGC && (ShenandoahReadBarrier || ShenandoahStoreValReadBarrier ||
 136                                ShenandoahWriteBarrier || ShenandoahAcmpBarrier),
 137            "should be enabled");


< prev index next >