91 92 public: 93 static ShenandoahBarrierSetC2* bsc2(); 94 95 static bool is_shenandoah_wb_pre_call(Node* call); 96 static bool is_shenandoah_lrb_call(Node* call); 97 static bool is_shenandoah_marking_if(PhaseTransform *phase, Node* n); 98 static bool is_shenandoah_state_load(Node* n); 99 static bool has_only_shenandoah_wb_pre_uses(Node* n); 100 101 ShenandoahBarrierSetC2State* state() const; 102 103 static const TypeFunc* write_ref_field_pre_entry_Type(); 104 static const TypeFunc* shenandoah_clone_barrier_Type(); 105 static const TypeFunc* shenandoah_load_reference_barrier_Type(); 106 virtual bool has_load_barriers() const { return true; } 107 108 // This is the entry-point for the backend to perform accesses through the Access API. 109 virtual void clone(GraphKit* kit, Node* src, Node* dst, Node* size, bool is_array) const; 110 111 // These are general helper methods used by C2 112 virtual bool array_copy_requires_gc_barriers(BasicType type) const; 113 114 // Support for GC barriers emitted during parsing 115 virtual bool is_gc_barrier_node(Node* node) const; 116 virtual Node* step_over_gc_barrier(Node* c) const; 117 virtual bool expand_barriers(Compile* C, PhaseIterGVN& igvn) const; 118 virtual bool optimize_loops(PhaseIdealLoop* phase, LoopOptsMode mode, VectorSet& visited, Node_Stack& nstack, Node_List& worklist) const; 119 virtual bool strip_mined_loops_expanded(LoopOptsMode mode) const { return mode == LoopOptsShenandoahExpand || mode == LoopOptsShenandoahPostExpand; } 120 virtual bool is_gc_specific_loop_opts_pass(LoopOptsMode mode) const { return mode == LoopOptsShenandoahExpand || mode == LoopOptsShenandoahPostExpand; } 121 122 // Support for macro expanded GC barriers 123 virtual void register_potential_barrier_node(Node* node) const; 124 virtual void unregister_potential_barrier_node(Node* node) const; 125 virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const; 126 virtual void enqueue_useful_gc_barrier(Unique_Node_List &worklist, Node* node) const; 127 virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful) const; 128 virtual void add_users_to_worklist(Unique_Node_List* worklist) const; 129 130 // Allow barrier sets to have shared state that is preserved across a compilation unit. | 91 92 public: 93 static ShenandoahBarrierSetC2* bsc2(); 94 95 static bool is_shenandoah_wb_pre_call(Node* call); 96 static bool is_shenandoah_lrb_call(Node* call); 97 static bool is_shenandoah_marking_if(PhaseTransform *phase, Node* n); 98 static bool is_shenandoah_state_load(Node* n); 99 static bool has_only_shenandoah_wb_pre_uses(Node* n); 100 101 ShenandoahBarrierSetC2State* state() const; 102 103 static const TypeFunc* write_ref_field_pre_entry_Type(); 104 static const TypeFunc* shenandoah_clone_barrier_Type(); 105 static const TypeFunc* shenandoah_load_reference_barrier_Type(); 106 virtual bool has_load_barriers() const { return true; } 107 108 // This is the entry-point for the backend to perform accesses through the Access API. 109 virtual void clone(GraphKit* kit, Node* src, Node* dst, Node* size, bool is_array) const; 110 111 virtual void clone_at_expansion(PhaseMacroExpand* phase, ArrayCopyNode* ac) const; 112 113 // These are general helper methods used by C2 114 virtual bool array_copy_requires_gc_barriers(BasicType type) const; 115 116 // Support for GC barriers emitted during parsing 117 virtual bool is_gc_barrier_node(Node* node) const; 118 virtual Node* step_over_gc_barrier(Node* c) const; 119 virtual bool expand_barriers(Compile* C, PhaseIterGVN& igvn) const; 120 virtual bool optimize_loops(PhaseIdealLoop* phase, LoopOptsMode mode, VectorSet& visited, Node_Stack& nstack, Node_List& worklist) const; 121 virtual bool strip_mined_loops_expanded(LoopOptsMode mode) const { return mode == LoopOptsShenandoahExpand || mode == LoopOptsShenandoahPostExpand; } 122 virtual bool is_gc_specific_loop_opts_pass(LoopOptsMode mode) const { return mode == LoopOptsShenandoahExpand || mode == LoopOptsShenandoahPostExpand; } 123 124 // Support for macro expanded GC barriers 125 virtual void register_potential_barrier_node(Node* node) const; 126 virtual void unregister_potential_barrier_node(Node* node) const; 127 virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const; 128 virtual void enqueue_useful_gc_barrier(Unique_Node_List &worklist, Node* node) const; 129 virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful) const; 130 virtual void add_users_to_worklist(Unique_Node_List* worklist) const; 131 132 // Allow barrier sets to have shared state that is preserved across a compilation unit. |