< prev index next >

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

Print this page
rev 54995 : 8224675: Late GC barrier insertion for ZGC
Reviewed-by:


 114                              intx prefetch_lines) const;
 115 
 116   // These are general helper methods used by C2
 117   virtual bool array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const;
 118   virtual void clone_barrier_at_expansion(ArrayCopyNode* ac, Node* call, PhaseIterGVN& igvn) const;
 119 
 120   // Support for GC barriers emitted during parsing
 121   virtual bool is_gc_barrier_node(Node* node) const;
 122   virtual Node* step_over_gc_barrier(Node* c) const;
 123   virtual bool expand_barriers(Compile* C, PhaseIterGVN& igvn) const;
 124   virtual bool optimize_loops(PhaseIdealLoop* phase, LoopOptsMode mode, VectorSet& visited, Node_Stack& nstack, Node_List& worklist) const;
 125   virtual bool strip_mined_loops_expanded(LoopOptsMode mode) const { return mode == LoopOptsShenandoahExpand || mode == LoopOptsShenandoahPostExpand; }
 126   virtual bool is_gc_specific_loop_opts_pass(LoopOptsMode mode) const { return mode == LoopOptsShenandoahExpand || mode == LoopOptsShenandoahPostExpand; }
 127 
 128   // Support for macro expanded GC barriers
 129   virtual void register_potential_barrier_node(Node* node) const;
 130   virtual void unregister_potential_barrier_node(Node* node) const;
 131   virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const;
 132   virtual void enqueue_useful_gc_barrier(PhaseIterGVN* igvn, Node* node) const;
 133   virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful, Compile* C) const;
 134   virtual void add_users_to_worklist(Unique_Node_List* worklist) const;
 135 
 136   // Allow barrier sets to have shared state that is preserved across a compilation unit.
 137   // This could for example comprise macro nodes to be expanded during macro expansion.
 138   virtual void* create_barrier_state(Arena* comp_arena) const;
 139   // If the BarrierSetC2 state has kept macro nodes in its compilation unit state to be
 140   // expanded later, then now is the time to do so.
 141   virtual bool expand_macro_nodes(PhaseMacroExpand* macro) const;
 142 
 143 #ifdef ASSERT
 144   virtual void verify_gc_barriers(Compile* compile, CompilePhase phase) const;
 145 #endif
 146 
 147   virtual Node* ideal_node(PhaseGVN* phase, Node* n, bool can_reshape) const;
 148   virtual bool final_graph_reshaping(Compile* compile, Node* n, uint opcode) const;
 149 
 150   virtual bool escape_add_to_con_graph(ConnectionGraph* conn_graph, PhaseGVN* gvn, Unique_Node_List* delayed_worklist, Node* n, uint opcode) const;
 151   virtual bool escape_add_final_edges(ConnectionGraph* conn_graph, PhaseGVN* gvn, Node* n, uint opcode) const;
 152   virtual bool escape_has_out_with_unsafe_object(Node* n) const;
 153   virtual bool escape_is_barrier_node(Node* n) const;
 154 


 114                              intx prefetch_lines) const;
 115 
 116   // These are general helper methods used by C2
 117   virtual bool array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const;
 118   virtual void clone_barrier_at_expansion(ArrayCopyNode* ac, Node* call, PhaseIterGVN& igvn) const;
 119 
 120   // Support for GC barriers emitted during parsing
 121   virtual bool is_gc_barrier_node(Node* node) const;
 122   virtual Node* step_over_gc_barrier(Node* c) const;
 123   virtual bool expand_barriers(Compile* C, PhaseIterGVN& igvn) const;
 124   virtual bool optimize_loops(PhaseIdealLoop* phase, LoopOptsMode mode, VectorSet& visited, Node_Stack& nstack, Node_List& worklist) const;
 125   virtual bool strip_mined_loops_expanded(LoopOptsMode mode) const { return mode == LoopOptsShenandoahExpand || mode == LoopOptsShenandoahPostExpand; }
 126   virtual bool is_gc_specific_loop_opts_pass(LoopOptsMode mode) const { return mode == LoopOptsShenandoahExpand || mode == LoopOptsShenandoahPostExpand; }
 127 
 128   // Support for macro expanded GC barriers
 129   virtual void register_potential_barrier_node(Node* node) const;
 130   virtual void unregister_potential_barrier_node(Node* node) const;
 131   virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const;
 132   virtual void enqueue_useful_gc_barrier(PhaseIterGVN* igvn, Node* node) const;
 133   virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful, Compile* C) const;

 134 
 135   // Allow barrier sets to have shared state that is preserved across a compilation unit.
 136   // This could for example comprise macro nodes to be expanded during macro expansion.
 137   virtual void* create_barrier_state(Arena* comp_arena) const;
 138   // If the BarrierSetC2 state has kept macro nodes in its compilation unit state to be
 139   // expanded later, then now is the time to do so.
 140   virtual bool expand_macro_nodes(PhaseMacroExpand* macro) const;
 141 
 142 #ifdef ASSERT
 143   virtual void verify_gc_barriers(Compile* compile, CompilePhase phase) const;
 144 #endif
 145 
 146   virtual Node* ideal_node(PhaseGVN* phase, Node* n, bool can_reshape) const;
 147   virtual bool final_graph_reshaping(Compile* compile, Node* n, uint opcode) const;
 148 
 149   virtual bool escape_add_to_con_graph(ConnectionGraph* conn_graph, PhaseGVN* gvn, Unique_Node_List* delayed_worklist, Node* n, uint opcode) const;
 150   virtual bool escape_add_final_edges(ConnectionGraph* conn_graph, PhaseGVN* gvn, Node* n, uint opcode) const;
 151   virtual bool escape_has_out_with_unsafe_object(Node* n) const;
 152   virtual bool escape_is_barrier_node(Node* n) const;
 153 
< prev index next >