< prev index next >
src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
Print this page
rev 54995 : 8224675: Late GC barrier insertion for ZGC
Reviewed-by:
@@ -257,10 +257,11 @@
enum ArrayCopyPhase {
Parsing,
Optimization,
Expansion
};
+
virtual bool array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const { return false; }
virtual void clone_barrier_at_expansion(ArrayCopyNode* ac, Node* call, PhaseIterGVN& igvn) const;
// Support for GC barriers emitted during parsing
virtual bool has_load_barriers() const { return false; }
@@ -271,11 +272,10 @@
virtual void register_potential_barrier_node(Node* node) const { }
virtual void unregister_potential_barrier_node(Node* node) const { }
virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const { }
virtual void enqueue_useful_gc_barrier(PhaseIterGVN* igvn, Node* node) const {}
virtual void eliminate_useless_gc_barriers(Unique_Node_List &useful, Compile* C) const {}
- virtual void add_users_to_worklist(Unique_Node_List* worklist) const {}
// Allow barrier sets to have shared state that is preserved across a compilation unit.
// This could for example comprise macro nodes to be expanded during macro expansion.
virtual void* create_barrier_state(Arena* comp_arena) const { return NULL; }
// If the BarrierSetC2 state has barrier nodes in its compilation
@@ -284,21 +284,26 @@
virtual bool optimize_loops(PhaseIdealLoop* phase, LoopOptsMode mode, VectorSet& visited, Node_Stack& nstack, Node_List& worklist) const { return false; }
virtual bool strip_mined_loops_expanded(LoopOptsMode mode) const { return false; }
virtual bool is_gc_specific_loop_opts_pass(LoopOptsMode mode) const { return false; }
virtual bool has_special_unique_user(const Node* node) const { return false; }
+ virtual bool needs_anti_dependence_check(const Node* node) const { return true; }
+
+ virtual void barrier_insertion_phase(PhaseIterGVN &igvn) const { };
+ virtual void barrier_insertion(PhaseIdealLoop* phase) const { };
enum CompilePhase {
- BeforeOptimize, /* post_parse = true */
- BeforeExpand, /* post_parse = false */
+ BeforeOptimize,
+ BeforeLateInsertion,
+ BeforeMacroExpand,
BeforeCodeGen
};
- virtual void verify_gc_barriers(Compile* compile, CompilePhase phase) const {}
virtual bool flatten_gc_alias_type(const TypePtr*& adr_type) const { return false; }
#ifdef ASSERT
virtual bool verify_gc_alias_type(const TypePtr* adr_type, int offset) const { return false; }
+ virtual void verify_gc_barriers(Compile* compile, CompilePhase phase) const {}
#endif
virtual bool final_graph_reshaping(Compile* compile, Node* n, uint opcode) const { return false; }
virtual bool escape_add_to_con_graph(ConnectionGraph* conn_graph, PhaseGVN* gvn, Unique_Node_List* delayed_worklist, Node* n, uint opcode) const { return false; }
@@ -308,12 +313,12 @@
virtual bool matcher_find_shared_visit(Matcher* matcher, Matcher::MStack& mstack, Node* n, uint opcode, bool& mem_op, int& mem_addr_idx) const { return false; };
virtual bool matcher_find_shared_post_visit(Matcher* matcher, Node* n, uint opcode) const { return false; };
virtual bool matcher_is_store_load_barrier(Node* x, uint xop) const { return false; }
- virtual void igvn_add_users_to_worklist(PhaseIterGVN* igvn, Node* use) const {}
- virtual void ccp_analyze(PhaseCCP* ccp, Unique_Node_List& worklist, Node* use) const {}
+ virtual void igvn_add_users_to_worklist(PhaseIterGVN* igvn, Node* use) const { }
+ virtual void ccp_analyze(PhaseCCP* ccp, Unique_Node_List& worklist, Node* use) const { }
virtual Node* split_if_pre(PhaseIdealLoop* phase, Node* n) const { return NULL; }
virtual bool build_loop_late_post(PhaseIdealLoop* phase, Node* n) const { return false; }
virtual bool sink_node(PhaseIdealLoop* phase, Node* n, Node* x, Node* x_ctrl, Node* n_ctrl) const { return false; }
};
< prev index next >