86 virtual Node* store_at_resolved(C2Access& access, C2AccessValue& val) const;
87 virtual Node* atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
88 Node* new_val, const Type* val_type) const;
89 virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
90 Node* new_val, const Type* value_type) const;
91 virtual Node* atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* val_type) const;
92
93 public:
94 static ShenandoahBarrierSetC2* bsc2();
95
96 static bool is_shenandoah_wb_pre_call(Node* call);
97 static bool is_shenandoah_lrb_call(Node* call);
98 static bool is_shenandoah_marking_if(PhaseTransform *phase, Node* n);
99 static bool is_shenandoah_state_load(Node* n);
100 static bool has_only_shenandoah_wb_pre_uses(Node* n);
101
102 ShenandoahBarrierSetC2State* state() const;
103
104 static const TypeFunc* write_ref_field_pre_entry_Type();
105 static const TypeFunc* shenandoah_clone_barrier_Type();
106 static const TypeFunc* shenandoah_load_reference_barrier_Type();
107 virtual bool has_load_barrier_nodes() const { return true; }
108
109 // This is the entry-point for the backend to perform accesses through the Access API.
110 virtual void clone_at_expansion(PhaseMacroExpand* phase, ArrayCopyNode* ac) const;
111
112 // These are general helper methods used by C2
113 virtual bool array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const;
114
115 // Support for GC barriers emitted during parsing
116 virtual bool is_gc_barrier_node(Node* node) const;
117 virtual Node* step_over_gc_barrier(Node* c) const;
118 virtual bool expand_barriers(Compile* C, PhaseIterGVN& igvn) const;
119 virtual bool optimize_loops(PhaseIdealLoop* phase, LoopOptsMode mode, VectorSet& visited, Node_Stack& nstack, Node_List& worklist) const;
120 virtual bool strip_mined_loops_expanded(LoopOptsMode mode) const { return mode == LoopOptsShenandoahExpand || mode == LoopOptsShenandoahPostExpand; }
121 virtual bool is_gc_specific_loop_opts_pass(LoopOptsMode mode) const { return mode == LoopOptsShenandoahExpand || mode == LoopOptsShenandoahPostExpand; }
122
123 // Support for macro expanded GC barriers
124 virtual void register_potential_barrier_node(Node* node) const;
125 virtual void unregister_potential_barrier_node(Node* node) const;
126 virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const;
|
86 virtual Node* store_at_resolved(C2Access& access, C2AccessValue& val) const;
87 virtual Node* atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
88 Node* new_val, const Type* val_type) const;
89 virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
90 Node* new_val, const Type* value_type) const;
91 virtual Node* atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* val_type) const;
92
93 public:
94 static ShenandoahBarrierSetC2* bsc2();
95
96 static bool is_shenandoah_wb_pre_call(Node* call);
97 static bool is_shenandoah_lrb_call(Node* call);
98 static bool is_shenandoah_marking_if(PhaseTransform *phase, Node* n);
99 static bool is_shenandoah_state_load(Node* n);
100 static bool has_only_shenandoah_wb_pre_uses(Node* n);
101
102 ShenandoahBarrierSetC2State* state() const;
103
104 static const TypeFunc* write_ref_field_pre_entry_Type();
105 static const TypeFunc* shenandoah_clone_barrier_Type();
106 static const TypeFunc* shenandoah_load_reference_barrier_Type(const Type* value_type);
107 virtual bool has_load_barrier_nodes() const { return true; }
108
109 // This is the entry-point for the backend to perform accesses through the Access API.
110 virtual void clone_at_expansion(PhaseMacroExpand* phase, ArrayCopyNode* ac) const;
111
112 // These are general helper methods used by C2
113 virtual bool array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const;
114
115 // Support for GC barriers emitted during parsing
116 virtual bool is_gc_barrier_node(Node* node) const;
117 virtual Node* step_over_gc_barrier(Node* c) const;
118 virtual bool expand_barriers(Compile* C, PhaseIterGVN& igvn) const;
119 virtual bool optimize_loops(PhaseIdealLoop* phase, LoopOptsMode mode, VectorSet& visited, Node_Stack& nstack, Node_List& worklist) const;
120 virtual bool strip_mined_loops_expanded(LoopOptsMode mode) const { return mode == LoopOptsShenandoahExpand || mode == LoopOptsShenandoahPostExpand; }
121 virtual bool is_gc_specific_loop_opts_pass(LoopOptsMode mode) const { return mode == LoopOptsShenandoahExpand || mode == LoopOptsShenandoahPostExpand; }
122
123 // Support for macro expanded GC barriers
124 virtual void register_potential_barrier_node(Node* node) const;
125 virtual void unregister_potential_barrier_node(Node* node) const;
126 virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const;
|