106 virtual Node* atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
107 Node* new_val, const Type* val_type) const;
108 virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
109 Node* new_val, const Type* value_type) const;
110 virtual Node* atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* val_type) const;
111
112 public:
113 static ShenandoahBarrierSetC2* bsc2();
114
115 ShenandoahBarrierSetC2State* state() const;
116
117 // This is the entry-point for the backend to perform accesses through the Access API.
118 virtual void clone(GraphKit* kit, Node* src_base, Node* dst_base, Node* size, bool is_array) const;
119 virtual void clone_at_expansion(PhaseMacroExpand* phase, ArrayCopyNode* ac) const;
120
121 // These are general helper methods used by C2
122 virtual bool array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone,
123 bool is_clone_instance, ArrayCopyPhase phase) const;
124
125 // Support for macro expanded GC barriers
126 virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const;
127 virtual void eliminate_gc_barrier_data(Node* node) const;
128
129 // Allow barrier sets to have shared state that is preserved across a compilation unit.
130 // This could for example comprise macro nodes to be expanded during macro expansion.
131 virtual void* create_barrier_state(Arena* comp_arena) const;
132
133 #ifdef ASSERT
134 virtual void verify_gc_barriers(Compile* compile, CompilePhase phase) const;
135 static void verify_gc_barrier_assert(bool cond, const char* msg, uint8_t bd, Node* n);
136 #endif
137
138 virtual int estimate_stub_size() const;
139 virtual void emit_stubs(CodeBuffer& cb) const;
140 virtual void late_barrier_analysis() const {
141 compute_liveness_at_stubs();
142 analyze_dominating_barriers();
143 }
144
145 virtual void elide_dominated_barrier(MachNode* mach, MachNode* dominator) const;
146 virtual void analyze_dominating_barriers() const;
|
106 virtual Node* atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
107 Node* new_val, const Type* val_type) const;
108 virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
109 Node* new_val, const Type* value_type) const;
110 virtual Node* atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* val_type) const;
111
112 public:
113 static ShenandoahBarrierSetC2* bsc2();
114
115 ShenandoahBarrierSetC2State* state() const;
116
117 // This is the entry-point for the backend to perform accesses through the Access API.
118 virtual void clone(GraphKit* kit, Node* src_base, Node* dst_base, Node* size, bool is_array) const;
119 virtual void clone_at_expansion(PhaseMacroExpand* phase, ArrayCopyNode* ac) const;
120
121 // These are general helper methods used by C2
122 virtual bool array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone,
123 bool is_clone_instance, ArrayCopyPhase phase) const;
124
125 // Support for macro expanded GC barriers
126 virtual void eliminate_gc_barrier(PhaseIterGVN* macro, Node* node) const;
127 virtual void eliminate_gc_barrier_data(Node* node) const;
128
129 // Allow barrier sets to have shared state that is preserved across a compilation unit.
130 // This could for example comprise macro nodes to be expanded during macro expansion.
131 virtual void* create_barrier_state(Arena* comp_arena) const;
132
133 #ifdef ASSERT
134 virtual void verify_gc_barriers(Compile* compile, CompilePhase phase) const;
135 static void verify_gc_barrier_assert(bool cond, const char* msg, uint8_t bd, Node* n);
136 #endif
137
138 virtual int estimate_stub_size() const;
139 virtual void emit_stubs(CodeBuffer& cb) const;
140 virtual void late_barrier_analysis() const {
141 compute_liveness_at_stubs();
142 analyze_dominating_barriers();
143 }
144
145 virtual void elide_dominated_barrier(MachNode* mach, MachNode* dominator) const;
146 virtual void analyze_dominating_barriers() const;
|