175 Node* new_val, const Type* value_type) const;
176 virtual Node* atomic_xchg_at_resolved(C2AtomicAccess& access, Node* new_val, const Type* val_type) const;
177 virtual Node* atomic_add_at_resolved(C2AtomicAccess& access, Node* new_val, const Type* val_type) const;
178
179 public:
180 // This is the entry-point for the backend to perform accesses through the Access API.
181 virtual Node* store_at(C2Access& access, C2AccessValue& val) const;
182 virtual Node* load_at(C2Access& access, const Type* val_type) const;
183
184 virtual Node* atomic_cmpxchg_val_at(C2AtomicAccess& access, Node* expected_val,
185 Node* new_val, const Type* val_type) const;
186 virtual Node* atomic_cmpxchg_bool_at(C2AtomicAccess& access, Node* expected_val,
187 Node* new_val, const Type* val_type) const;
188 virtual Node* atomic_xchg_at(C2AtomicAccess& access, Node* new_val, const Type* value_type) const;
189 virtual Node* atomic_add_at(C2AtomicAccess& access, Node* new_val, const Type* value_type) const;
190
191 virtual void clone(GraphKit* kit, Node* src, Node* dst, Node* size, bool is_array) const;
192
193 virtual Node* resolve(GraphKit* kit, Node* n, DecoratorSet decorators) const { return n; }
194
195 // These are general helper methods used by C2
196 virtual bool array_copy_requires_gc_barriers(BasicType type) const { return false; }
197
198 // Support for GC barriers emitted during parsing
199 virtual bool has_load_barriers() const { return false; }
200 virtual bool is_gc_barrier_node(Node* node) const { return false; }
201 virtual Node* step_over_gc_barrier(Node* c) const { return c; }
202
203 // Support for macro expanded GC barriers
204 virtual void register_potential_barrier_node(Node* node) const { }
205 virtual void unregister_potential_barrier_node(Node* node) const { }
206 virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const { }
207 virtual void enqueue_useful_gc_barrier(Unique_Node_List &worklist, Node* node) const {}
208 virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful) const {}
209 virtual void add_users_to_worklist(Unique_Node_List* worklist) const {}
210
211 // Allow barrier sets to have shared state that is preserved across a compilation unit.
212 // This could for example comprise macro nodes to be expanded during macro expansion.
213 virtual void* create_barrier_state(Arena* comp_arena) const { return NULL; }
214 // If the BarrierSetC2 state has kept macro nodes in its compilation unit state to be
215 // expanded later, then now is the time to do so.
|
175 Node* new_val, const Type* value_type) const;
176 virtual Node* atomic_xchg_at_resolved(C2AtomicAccess& access, Node* new_val, const Type* val_type) const;
177 virtual Node* atomic_add_at_resolved(C2AtomicAccess& access, Node* new_val, const Type* val_type) const;
178
179 public:
180 // This is the entry-point for the backend to perform accesses through the Access API.
181 virtual Node* store_at(C2Access& access, C2AccessValue& val) const;
182 virtual Node* load_at(C2Access& access, const Type* val_type) const;
183
184 virtual Node* atomic_cmpxchg_val_at(C2AtomicAccess& access, Node* expected_val,
185 Node* new_val, const Type* val_type) const;
186 virtual Node* atomic_cmpxchg_bool_at(C2AtomicAccess& access, Node* expected_val,
187 Node* new_val, const Type* val_type) const;
188 virtual Node* atomic_xchg_at(C2AtomicAccess& access, Node* new_val, const Type* value_type) const;
189 virtual Node* atomic_add_at(C2AtomicAccess& access, Node* new_val, const Type* value_type) const;
190
191 virtual void clone(GraphKit* kit, Node* src, Node* dst, Node* size, bool is_array) const;
192
193 virtual Node* resolve(GraphKit* kit, Node* n, DecoratorSet decorators) const { return n; }
194
195 virtual Node* obj_allocate(PhaseMacroExpand* macro, Node* ctrl, Node* mem, Node* toobig_false, Node* size_in_bytes,
196 Node*& i_o, Node*& needgc_ctrl,
197 Node*& fast_oop_ctrl, Node*& fast_oop_rawmem,
198 intx prefetch_lines) const;
199
200 // These are general helper methods used by C2
201 virtual bool array_copy_requires_gc_barriers(BasicType type) const { return false; }
202
203 // Support for GC barriers emitted during parsing
204 virtual bool has_load_barriers() const { return false; }
205 virtual bool is_gc_barrier_node(Node* node) const { return false; }
206 virtual Node* step_over_gc_barrier(Node* c) const { return c; }
207
208 // Support for macro expanded GC barriers
209 virtual void register_potential_barrier_node(Node* node) const { }
210 virtual void unregister_potential_barrier_node(Node* node) const { }
211 virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const { }
212 virtual void enqueue_useful_gc_barrier(Unique_Node_List &worklist, Node* node) const {}
213 virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful) const {}
214 virtual void add_users_to_worklist(Unique_Node_List* worklist) const {}
215
216 // Allow barrier sets to have shared state that is preserved across a compilation unit.
217 // This could for example comprise macro nodes to be expanded during macro expansion.
218 virtual void* create_barrier_state(Arena* comp_arena) const { return NULL; }
219 // If the BarrierSetC2 state has kept macro nodes in its compilation unit state to be
220 // expanded later, then now is the time to do so.
|