< prev index next >

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

Print this page
rev 59195 : 8244594: [BACKOUT] 8244523: Shenandoah: Remove null-handling in LRB expansion
rev 59196 : 8244595: [REDO] 8244523: Shenandoah: Remove null-handling in LRB expansion


  44     ShenandoahStore,
  45     ShenandoahValue,
  46     ShenandoahOopStore,
  47     ShenandoahNone
  48   };
  49 
  50   static bool verify_helper(Node* in, Node_Stack& phis, VectorSet& visited, verify_type t, bool trace, Unique_Node_List& barriers_used);
  51   static void report_verify_failure(const char* msg, Node* n1 = NULL, Node* n2 = NULL);
  52   static void verify_raw_mem(RootNode* root);
  53 #endif
  54   static Node* dom_mem(Node* mem, Node* ctrl, int alias, Node*& mem_ctrl, PhaseIdealLoop* phase);
  55   static Node* no_branches(Node* c, Node* dom, bool allow_one_proj, PhaseIdealLoop* phase);
  56   static bool is_heap_state_test(Node* iff, int mask);
  57   static bool has_safepoint_between(Node* start, Node* stop, PhaseIdealLoop *phase);
  58   static Node* find_bottom_mem(Node* ctrl, PhaseIdealLoop* phase);
  59   static void follow_barrier_uses(Node* n, Node* ctrl, Unique_Node_List& uses, PhaseIdealLoop* phase);
  60   static void test_null(Node*& ctrl, Node* val, Node*& null_ctrl, PhaseIdealLoop* phase);
  61   static void test_heap_state(Node*& ctrl, Node* raw_mem, Node*& heap_stable_ctrl,
  62                               PhaseIdealLoop* phase, int flags);
  63   static void call_lrb_stub(Node*& ctrl, Node*& val, Node* load_addr, Node*& result_mem, Node* raw_mem, bool is_native, PhaseIdealLoop* phase);
  64   static Node* clone_null_check(Node*& c, Node* val, Node* unc_ctrl, PhaseIdealLoop* phase);
  65   static void fix_null_check(Node* unc, Node* unc_ctrl, Node* new_unc_ctrl, Unique_Node_List& uses,
  66                              PhaseIdealLoop* phase);
  67   static void in_cset_fast_test(Node*& ctrl, Node*& not_cset_ctrl, Node* val, Node* raw_mem, PhaseIdealLoop* phase);
  68   static void move_heap_stable_test_out_of_loop(IfNode* iff, PhaseIdealLoop* phase);
  69   static void merge_back_to_back_tests(Node* n, PhaseIdealLoop* phase);
  70   static bool identical_backtoback_ifs(Node *n, PhaseIdealLoop* phase);
  71   static void fix_ctrl(Node* barrier, Node* region, const MemoryGraphFixer& fixer, Unique_Node_List& uses, Unique_Node_List& uses_to_ignore, uint last, PhaseIdealLoop* phase);
  72   static IfNode* find_unswitching_candidate(const IdealLoopTree *loop, PhaseIdealLoop* phase);
  73 
  74   static Node* get_load_addr(PhaseIdealLoop* phase, VectorSet& visited, Node* lrb);
  75 public:
  76   static bool is_dominator(Node* d_c, Node* n_c, Node* d, Node* n, PhaseIdealLoop* phase);
  77   static bool is_dominator_same_ctrl(Node* c, Node* d, Node* n, PhaseIdealLoop* phase);
  78 
  79   static bool is_gc_state_load(Node* n);
  80   static bool is_heap_stable_test(Node* iff);
  81 
  82   static bool expand(Compile* C, PhaseIterGVN& igvn);
  83   static void pin_and_expand(PhaseIdealLoop* phase);
  84   static void optimize_after_expansion(VectorSet& visited, Node_Stack& nstack, Node_List& old_new, PhaseIdealLoop* phase);
  85 
  86 #ifdef ASSERT


 237 public:
 238   ShenandoahLoadReferenceBarrierNode(Node* ctrl, Node* val, bool native);
 239 
 240   bool is_native() const;
 241   virtual int Opcode() const;
 242   virtual const Type* bottom_type() const;
 243   virtual const Type* Value(PhaseGVN* phase) const;
 244   virtual const class TypePtr *adr_type() const { return TypeOopPtr::BOTTOM; }
 245   virtual uint match_edge(uint idx) const {
 246     return idx >= ValueIn;
 247   }
 248   virtual uint ideal_reg() const { return Op_RegP; }
 249 
 250   virtual Node* Identity(PhaseGVN* phase);
 251 
 252   virtual uint size_of() const;
 253   virtual uint hash() const;
 254   virtual bool cmp( const Node &n ) const;
 255 
 256   bool is_redundant();
 257   CallStaticJavaNode* pin_and_expand_null_check(PhaseIterGVN& igvn);
 258 
 259 private:
 260   bool needs_barrier(PhaseGVN* phase, Node* n);
 261   bool needs_barrier_impl(PhaseGVN* phase, Node* n, Unique_Node_List &visited);
 262 };
 263 
 264 
 265 #endif // SHARE_GC_SHENANDOAH_C2_SHENANDOAHSUPPORT_HPP


  44     ShenandoahStore,
  45     ShenandoahValue,
  46     ShenandoahOopStore,
  47     ShenandoahNone
  48   };
  49 
  50   static bool verify_helper(Node* in, Node_Stack& phis, VectorSet& visited, verify_type t, bool trace, Unique_Node_List& barriers_used);
  51   static void report_verify_failure(const char* msg, Node* n1 = NULL, Node* n2 = NULL);
  52   static void verify_raw_mem(RootNode* root);
  53 #endif
  54   static Node* dom_mem(Node* mem, Node* ctrl, int alias, Node*& mem_ctrl, PhaseIdealLoop* phase);
  55   static Node* no_branches(Node* c, Node* dom, bool allow_one_proj, PhaseIdealLoop* phase);
  56   static bool is_heap_state_test(Node* iff, int mask);
  57   static bool has_safepoint_between(Node* start, Node* stop, PhaseIdealLoop *phase);
  58   static Node* find_bottom_mem(Node* ctrl, PhaseIdealLoop* phase);
  59   static void follow_barrier_uses(Node* n, Node* ctrl, Unique_Node_List& uses, PhaseIdealLoop* phase);
  60   static void test_null(Node*& ctrl, Node* val, Node*& null_ctrl, PhaseIdealLoop* phase);
  61   static void test_heap_state(Node*& ctrl, Node* raw_mem, Node*& heap_stable_ctrl,
  62                               PhaseIdealLoop* phase, int flags);
  63   static void call_lrb_stub(Node*& ctrl, Node*& val, Node* load_addr, Node*& result_mem, Node* raw_mem, bool is_native, PhaseIdealLoop* phase);



  64   static void in_cset_fast_test(Node*& ctrl, Node*& not_cset_ctrl, Node* val, Node* raw_mem, PhaseIdealLoop* phase);
  65   static void move_heap_stable_test_out_of_loop(IfNode* iff, PhaseIdealLoop* phase);
  66   static void merge_back_to_back_tests(Node* n, PhaseIdealLoop* phase);
  67   static bool identical_backtoback_ifs(Node *n, PhaseIdealLoop* phase);
  68   static void fix_ctrl(Node* barrier, Node* region, const MemoryGraphFixer& fixer, Unique_Node_List& uses, Unique_Node_List& uses_to_ignore, uint last, PhaseIdealLoop* phase);
  69   static IfNode* find_unswitching_candidate(const IdealLoopTree *loop, PhaseIdealLoop* phase);
  70 
  71   static Node* get_load_addr(PhaseIdealLoop* phase, VectorSet& visited, Node* lrb);
  72 public:
  73   static bool is_dominator(Node* d_c, Node* n_c, Node* d, Node* n, PhaseIdealLoop* phase);
  74   static bool is_dominator_same_ctrl(Node* c, Node* d, Node* n, PhaseIdealLoop* phase);
  75 
  76   static bool is_gc_state_load(Node* n);
  77   static bool is_heap_stable_test(Node* iff);
  78 
  79   static bool expand(Compile* C, PhaseIterGVN& igvn);
  80   static void pin_and_expand(PhaseIdealLoop* phase);
  81   static void optimize_after_expansion(VectorSet& visited, Node_Stack& nstack, Node_List& old_new, PhaseIdealLoop* phase);
  82 
  83 #ifdef ASSERT


 234 public:
 235   ShenandoahLoadReferenceBarrierNode(Node* ctrl, Node* val, bool native);
 236 
 237   bool is_native() const;
 238   virtual int Opcode() const;
 239   virtual const Type* bottom_type() const;
 240   virtual const Type* Value(PhaseGVN* phase) const;
 241   virtual const class TypePtr *adr_type() const { return TypeOopPtr::BOTTOM; }
 242   virtual uint match_edge(uint idx) const {
 243     return idx >= ValueIn;
 244   }
 245   virtual uint ideal_reg() const { return Op_RegP; }
 246 
 247   virtual Node* Identity(PhaseGVN* phase);
 248 
 249   virtual uint size_of() const;
 250   virtual uint hash() const;
 251   virtual bool cmp( const Node &n ) const;
 252 
 253   bool is_redundant();

 254 
 255 private:
 256   bool needs_barrier(PhaseGVN* phase, Node* n);
 257   bool needs_barrier_impl(PhaseGVN* phase, Node* n, Unique_Node_List &visited);
 258 };
 259 
 260 
 261 #endif // SHARE_GC_SHENANDOAH_C2_SHENANDOAHSUPPORT_HPP
< prev index next >