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; } 226 virtual void verify_gc_barriers(bool post_parse) const {} 227 }; 228 229 #endif // SHARE_GC_SHARED_C2_BARRIERSETC2_HPP | 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 virtual Node* array_copy_load_store_barrier(PhaseGVN *phase, bool can_reshape, Node* v, MergeMemNode* mem, Node*& ctl) const { return v; } 207 virtual void array_copy_post_barrier_at_expansion(ArrayCopyNode* ac, Node*& c, Node*& m, PhaseIterGVN& igvn) const { } 208 209 // Support for GC barriers emitted during parsing 210 virtual bool has_load_barriers() const { return false; } 211 virtual bool is_gc_barrier_node(Node* node) const { return false; } 212 virtual Node* step_over_gc_barrier(Node* c) const { return c; } 213 214 // Support for macro expanded GC barriers 215 virtual void register_potential_barrier_node(Node* node) const { } 216 virtual void unregister_potential_barrier_node(Node* node) const { } 217 virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const { } 218 virtual void enqueue_useful_gc_barrier(PhaseIterGVN* igvn, Node* node) const {} 219 virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful, Compile* C) const {} 220 virtual void add_users_to_worklist(Unique_Node_List* worklist) const {} 221 222 // Allow barrier sets to have shared state that is preserved across a compilation unit. 223 // This could for example comprise macro nodes to be expanded during macro expansion. 224 virtual void* create_barrier_state(Arena* comp_arena) const { return NULL; } 225 // If the BarrierSetC2 state has kept macro nodes in its compilation unit state to be 226 // expanded later, then now is the time to do so. 227 virtual bool expand_macro_nodes(PhaseMacroExpand* macro) const { return false; } 228 virtual void verify_gc_barriers(bool post_parse) const {} 229 }; 230 231 #endif // SHARE_GC_SHARED_C2_BARRIERSETC2_HPP |