< prev index next >

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

Print this page

307                              Node*& fast_oop_ctrl, Node*& fast_oop_rawmem,
308                              intx prefetch_lines) const;
309 
310   virtual Node* ideal_node(PhaseGVN* phase, Node* n, bool can_reshape) const { return nullptr; }
311 
312   // These are general helper methods used by C2
313   enum ArrayCopyPhase {
314     Parsing,
315     Optimization,
316     Expansion
317   };
318 
319   virtual bool array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, bool is_clone_instance, ArrayCopyPhase phase) const { return false; }
320   virtual void clone_at_expansion(PhaseMacroExpand* phase, ArrayCopyNode* ac) const;
321 
322   // Support for GC barriers emitted during parsing
323   virtual bool has_load_barrier_nodes() const { return false; }
324   virtual bool is_gc_pre_barrier_node(Node* node) const { return false; }
325   virtual bool is_gc_barrier_node(Node* node) const { return false; }
326   virtual Node* step_over_gc_barrier(Node* c) const { return c; }

327 
328   // Support for macro expanded GC barriers
329   virtual void register_potential_barrier_node(Node* node) const { }
330   virtual void unregister_potential_barrier_node(Node* node) const { }
331   virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const { }
332   virtual void eliminate_gc_barrier_data(Node* node) const { }
333   virtual void enqueue_useful_gc_barrier(PhaseIterGVN* igvn, Node* node) const {}
334   virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful, Compile* C) const {}
335 
336   // Allow barrier sets to have shared state that is preserved across a compilation unit.
337   // This could for example comprise macro nodes to be expanded during macro expansion.
338   virtual void* create_barrier_state(Arena* comp_arena) const { return nullptr; }
339   // If the BarrierSetC2 state has barrier nodes in its compilation
340   // unit state to be expanded later, then now is the time to do so.
341   virtual bool expand_barriers(Compile* C, PhaseIterGVN& igvn) const { return false; }
342   virtual bool optimize_loops(PhaseIdealLoop* phase, LoopOptsMode mode, VectorSet& visited, Node_Stack& nstack, Node_List& worklist) const { return false; }
343   virtual bool strip_mined_loops_expanded(LoopOptsMode mode) const { return false; }
344   virtual bool is_gc_specific_loop_opts_pass(LoopOptsMode mode) const { return false; }
345   // Estimated size of the node barrier in number of C2 Ideal nodes.
346   // This is used to guide heuristics in C2, e.g. whether to unroll a loop.

307                              Node*& fast_oop_ctrl, Node*& fast_oop_rawmem,
308                              intx prefetch_lines) const;
309 
310   virtual Node* ideal_node(PhaseGVN* phase, Node* n, bool can_reshape) const { return nullptr; }
311 
312   // These are general helper methods used by C2
313   enum ArrayCopyPhase {
314     Parsing,
315     Optimization,
316     Expansion
317   };
318 
319   virtual bool array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, bool is_clone_instance, ArrayCopyPhase phase) const { return false; }
320   virtual void clone_at_expansion(PhaseMacroExpand* phase, ArrayCopyNode* ac) const;
321 
322   // Support for GC barriers emitted during parsing
323   virtual bool has_load_barrier_nodes() const { return false; }
324   virtual bool is_gc_pre_barrier_node(Node* node) const { return false; }
325   virtual bool is_gc_barrier_node(Node* node) const { return false; }
326   virtual Node* step_over_gc_barrier(Node* c) const { return c; }
327   virtual int reserved_slots() const { return 0; }
328 
329   // Support for macro expanded GC barriers
330   virtual void register_potential_barrier_node(Node* node) const { }
331   virtual void unregister_potential_barrier_node(Node* node) const { }
332   virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const { }
333   virtual void eliminate_gc_barrier_data(Node* node) const { }
334   virtual void enqueue_useful_gc_barrier(PhaseIterGVN* igvn, Node* node) const {}
335   virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful, Compile* C) const {}
336 
337   // Allow barrier sets to have shared state that is preserved across a compilation unit.
338   // This could for example comprise macro nodes to be expanded during macro expansion.
339   virtual void* create_barrier_state(Arena* comp_arena) const { return nullptr; }
340   // If the BarrierSetC2 state has barrier nodes in its compilation
341   // unit state to be expanded later, then now is the time to do so.
342   virtual bool expand_barriers(Compile* C, PhaseIterGVN& igvn) const { return false; }
343   virtual bool optimize_loops(PhaseIdealLoop* phase, LoopOptsMode mode, VectorSet& visited, Node_Stack& nstack, Node_List& worklist) const { return false; }
344   virtual bool strip_mined_loops_expanded(LoopOptsMode mode) const { return false; }
345   virtual bool is_gc_specific_loop_opts_pass(LoopOptsMode mode) const { return false; }
346   // Estimated size of the node barrier in number of C2 Ideal nodes.
347   // This is used to guide heuristics in C2, e.g. whether to unroll a loop.
< prev index next >