< prev index next >

src/hotspot/share/gc/shared/c2/barrierSetC2.hpp

Print this page




 173                                                Node* new_val, const Type* val_type) const;
 174   virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicAccess& access, Node* expected_val,
 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   // These are general helper methods used by C2
 194   virtual bool array_copy_requires_gc_barriers(BasicType type) const { return false; }
 195 
 196   // Support for GC barriers emitted during parsing
 197   virtual bool is_gc_barrier_node(Node* node) const { return false; }
 198   virtual Node* step_over_gc_barrier(Node* c) const { return c; }
 199 
 200   // Support for macro expanded GC barriers
 201   virtual void register_potential_barrier_node(Node* node) const { }
 202   virtual void unregister_potential_barrier_node(Node* node) const { }
 203   virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const { }
 204   virtual void enqueue_useful_gc_barrier(Unique_Node_List &worklist, Node* node) const {}
 205   virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful) const {}
 206   virtual void add_users_to_worklist(Unique_Node_List* worklist) const {}
 207 
 208   // Allow barrier sets to have shared state that is preserved across a compilation unit.
 209   // This could for example comprise macro nodes to be expanded during macro expansion.
 210   virtual void* create_barrier_state(Arena* comp_arena) const { return NULL; }
 211   // If the BarrierSetC2 state has kept macro nodes in its compilation unit state to be
 212   // expanded later, then now is the time to do so.
 213   virtual bool expand_macro_nodes(PhaseMacroExpand* macro) const { return false; }
 214   virtual void verify_gc_barriers(bool post_parse) const {}
 215 };
 216 
 217 #endif // SHARE_GC_SHARED_C2_BARRIERSETC2_HPP


 173                                                Node* new_val, const Type* val_type) const;
 174   virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicAccess& access, Node* expected_val,
 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* ideal_node(PhaseGVN *phase, Node* n, bool can_reshape) const { return NULL; }
 194   virtual Node* identity_node(PhaseGVN* phase, Node* n) const { return n; }
 195 
 196   // These are general helper methods used by C2
 197   virtual bool array_copy_requires_gc_barriers(BasicType type) const { return false; }
 198 
 199   // Support for GC barriers emitted during parsing
 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(PhaseIterGVN* igvn, 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.
 216   virtual bool expand_macro_nodes(PhaseMacroExpand* macro) const { return false; }
 217   virtual void verify_gc_barriers(bool post_parse) const {}
 218 };
 219 
 220 #endif // SHARE_GC_SHARED_C2_BARRIERSETC2_HPP
< prev index next >