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