303 virtual Node* atomic_add_at(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const;
304
305 virtual void clone(GraphKit* kit, Node* src, Node* dst, Node* size, bool is_array) const;
306
307 virtual Node* obj_allocate(PhaseMacroExpand* macro, Node* mem, Node* toobig_false, Node* size_in_bytes,
308 Node*& i_o, Node*& needgc_ctrl,
309 Node*& fast_oop_ctrl, Node*& fast_oop_rawmem,
310 intx prefetch_lines) const;
311
312 virtual Node* ideal_node(PhaseGVN* phase, Node* n, bool can_reshape) const { return nullptr; }
313
314 // These are general helper methods used by C2
315 enum ArrayCopyPhase {
316 Parsing,
317 Optimization,
318 Expansion
319 };
320
321 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; }
322 virtual void clone_at_expansion(PhaseMacroExpand* phase, ArrayCopyNode* ac) const;
323
324 // Support for GC barriers emitted during parsing
325 virtual bool has_load_barrier_nodes() const { return false; }
326 virtual bool is_gc_pre_barrier_node(Node* node) const { return false; }
327 virtual bool is_gc_barrier_node(Node* node) const { return false; }
328 virtual Node* step_over_gc_barrier(Node* c) const { return c; }
329
330 // Support for macro expanded GC barriers
331 virtual void register_potential_barrier_node(Node* node) const { }
332 virtual void unregister_potential_barrier_node(Node* node) const { }
333 virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const { }
334 virtual void eliminate_gc_barrier_data(Node* node) const { }
335 virtual void enqueue_useful_gc_barrier(PhaseIterGVN* igvn, Node* node) const {}
336 virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful, Compile* C) const {}
337
338 // Allow barrier sets to have shared state that is preserved across a compilation unit.
339 // This could for example comprise macro nodes to be expanded during macro expansion.
340 virtual void* create_barrier_state(Arena* comp_arena) const { return nullptr; }
341 // If the BarrierSetC2 state has barrier nodes in its compilation
342 // unit state to be expanded later, then now is the time to do so.
|
303 virtual Node* atomic_add_at(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const;
304
305 virtual void clone(GraphKit* kit, Node* src, Node* dst, Node* size, bool is_array) const;
306
307 virtual Node* obj_allocate(PhaseMacroExpand* macro, Node* mem, Node* toobig_false, Node* size_in_bytes,
308 Node*& i_o, Node*& needgc_ctrl,
309 Node*& fast_oop_ctrl, Node*& fast_oop_rawmem,
310 intx prefetch_lines) const;
311
312 virtual Node* ideal_node(PhaseGVN* phase, Node* n, bool can_reshape) const { return nullptr; }
313
314 // These are general helper methods used by C2
315 enum ArrayCopyPhase {
316 Parsing,
317 Optimization,
318 Expansion
319 };
320
321 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; }
322 virtual void clone_at_expansion(PhaseMacroExpand* phase, ArrayCopyNode* ac) const;
323 bool should_copy_int_prefix(PhaseMacroExpand* phase, ArrayCopyNode* ac) const;
324 MergeMemNode* arraycopy_copy_int_prefix(PhaseMacroExpand* phase, Node* ctrl, Node* mem, Node* src, Node* dst) const;
325
326 // Support for GC barriers emitted during parsing
327 virtual bool has_load_barrier_nodes() const { return false; }
328 virtual bool is_gc_pre_barrier_node(Node* node) const { return false; }
329 virtual bool is_gc_barrier_node(Node* node) const { return false; }
330 virtual Node* step_over_gc_barrier(Node* c) const { return c; }
331
332 // Support for macro expanded GC barriers
333 virtual void register_potential_barrier_node(Node* node) const { }
334 virtual void unregister_potential_barrier_node(Node* node) const { }
335 virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const { }
336 virtual void eliminate_gc_barrier_data(Node* node) const { }
337 virtual void enqueue_useful_gc_barrier(PhaseIterGVN* igvn, Node* node) const {}
338 virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful, Compile* C) const {}
339
340 // Allow barrier sets to have shared state that is preserved across a compilation unit.
341 // This could for example comprise macro nodes to be expanded during macro expansion.
342 virtual void* create_barrier_state(Arena* comp_arena) const { return nullptr; }
343 // If the BarrierSetC2 state has barrier nodes in its compilation
344 // unit state to be expanded later, then now is the time to do so.
|