8226823: Adjust BarrierSetC2 for C2 runtime calls
Reviewed-by: neliasso, roland
This commit is contained in:
parent
4b821f00f3
commit
36bb50bad5
src/hotspot/share/opto
@ -350,6 +350,12 @@ void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *de
|
|||||||
if (n_ptn != NULL)
|
if (n_ptn != NULL)
|
||||||
return; // No need to redefine PointsTo node during first iteration.
|
return; // No need to redefine PointsTo node during first iteration.
|
||||||
|
|
||||||
|
int opcode = n->Opcode();
|
||||||
|
bool gc_handled = BarrierSet::barrier_set()->barrier_set_c2()->escape_add_to_con_graph(this, igvn, delayed_worklist, n, opcode);
|
||||||
|
if (gc_handled) {
|
||||||
|
return; // Ignore node if already handled by GC.
|
||||||
|
}
|
||||||
|
|
||||||
if (n->is_Call()) {
|
if (n->is_Call()) {
|
||||||
// Arguments to allocation and locking don't escape.
|
// Arguments to allocation and locking don't escape.
|
||||||
if (n->is_AbstractLock()) {
|
if (n->is_AbstractLock()) {
|
||||||
@ -382,11 +388,6 @@ void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *de
|
|||||||
if (n_ptn == phantom_obj || n_ptn == null_obj)
|
if (n_ptn == phantom_obj || n_ptn == null_obj)
|
||||||
return; // Skip predefined nodes.
|
return; // Skip predefined nodes.
|
||||||
|
|
||||||
int opcode = n->Opcode();
|
|
||||||
bool gc_handled = BarrierSet::barrier_set()->barrier_set_c2()->escape_add_to_con_graph(this, igvn, delayed_worklist, n, opcode);
|
|
||||||
if (gc_handled) {
|
|
||||||
return; // Ignore node if already handled by GC.
|
|
||||||
}
|
|
||||||
switch (opcode) {
|
switch (opcode) {
|
||||||
case Op_AddP: {
|
case Op_AddP: {
|
||||||
Node* base = get_addp_base(n);
|
Node* base = get_addp_base(n);
|
||||||
|
@ -333,7 +333,6 @@ private:
|
|||||||
|
|
||||||
bool _verify; // verify graph
|
bool _verify; // verify graph
|
||||||
|
|
||||||
JavaObjectNode* phantom_obj; // Unknown object
|
|
||||||
JavaObjectNode* null_obj;
|
JavaObjectNode* null_obj;
|
||||||
Node* _pcmp_neq; // ConI(#CC_GT)
|
Node* _pcmp_neq; // ConI(#CC_GT)
|
||||||
Node* _pcmp_eq; // ConI(#CC_EQ)
|
Node* _pcmp_eq; // ConI(#CC_EQ)
|
||||||
@ -343,6 +342,10 @@ private:
|
|||||||
|
|
||||||
Unique_Node_List ideal_nodes; // Used by CG construction and types splitting.
|
Unique_Node_List ideal_nodes; // Used by CG construction and types splitting.
|
||||||
|
|
||||||
|
public:
|
||||||
|
JavaObjectNode* phantom_obj; // Unknown object
|
||||||
|
|
||||||
|
private:
|
||||||
// Address of an element in _nodes. Used when the element is to be modified
|
// Address of an element in _nodes. Used when the element is to be modified
|
||||||
PointsToNode* ptnode_adr(int idx) const {
|
PointsToNode* ptnode_adr(int idx) const {
|
||||||
// There should be no new ideal nodes during ConnectionGraph build,
|
// There should be no new ideal nodes during ConnectionGraph build,
|
||||||
@ -365,12 +368,6 @@ private:
|
|||||||
// Add PointsToNode node corresponding to a call
|
// Add PointsToNode node corresponding to a call
|
||||||
void add_call_node(CallNode* call);
|
void add_call_node(CallNode* call);
|
||||||
|
|
||||||
// Map ideal node to existing PointsTo node (usually phantom_object).
|
|
||||||
void map_ideal_node(Node *n, PointsToNode* ptn) {
|
|
||||||
assert(ptn != NULL, "only existing PointsTo node");
|
|
||||||
_nodes.at_put(n->_idx, ptn);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create PointsToNode node and add it to Connection Graph.
|
// Create PointsToNode node and add it to Connection Graph.
|
||||||
void add_node_to_connection_graph(Node *n, Unique_Node_List *delayed_worklist);
|
void add_node_to_connection_graph(Node *n, Unique_Node_List *delayed_worklist);
|
||||||
|
|
||||||
@ -594,6 +591,12 @@ public:
|
|||||||
add_edge(ptnode_adr(n->_idx), ptn);
|
add_edge(ptnode_adr(n->_idx), ptn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Map ideal node to existing PointsTo node (usually phantom_object).
|
||||||
|
void map_ideal_node(Node *n, PointsToNode* ptn) {
|
||||||
|
assert(ptn != NULL, "only existing PointsTo node");
|
||||||
|
_nodes.at_put(n->_idx, ptn);
|
||||||
|
}
|
||||||
|
|
||||||
void add_to_congraph_unsafe_access(Node* n, uint opcode, Unique_Node_List* delayed_worklist);
|
void add_to_congraph_unsafe_access(Node* n, uint opcode, Unique_Node_List* delayed_worklist);
|
||||||
bool add_final_edges_unsafe_access(Node* n, uint opcode);
|
bool add_final_edges_unsafe_access(Node* n, uint opcode);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user