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