OpenJDK / amber / amber
changeset 57215:9523b841b470
8226823: Adjust BarrierSetC2 for C2 runtime calls
Reviewed-by: neliasso, roland
author | rkennke |
---|---|
date | Thu, 04 Jul 2019 17:02:19 +0200 |
parents | 05dac93510c0 |
children | fd1a4c4b7616 |
files | src/hotspot/share/opto/escape.cpp src/hotspot/share/opto/escape.hpp |
diffstat | 2 files changed, 16 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/opto/escape.cpp Thu Jul 04 17:02:17 2019 +0200 +++ b/src/hotspot/share/opto/escape.cpp Thu Jul 04 17:02:19 2019 +0200 @@ -350,6 +350,12 @@ if (n_ptn != NULL) 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()) { // Arguments to allocation and locking don't escape. if (n->is_AbstractLock()) { @@ -382,11 +388,6 @@ if (n_ptn == phantom_obj || n_ptn == null_obj) 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) { case Op_AddP: { Node* base = get_addp_base(n);
--- a/src/hotspot/share/opto/escape.hpp Thu Jul 04 17:02:17 2019 +0200 +++ b/src/hotspot/share/opto/escape.hpp Thu Jul 04 17:02:19 2019 +0200 @@ -333,7 +333,6 @@ bool _verify; // verify graph - JavaObjectNode* phantom_obj; // Unknown object JavaObjectNode* null_obj; Node* _pcmp_neq; // ConI(#CC_GT) Node* _pcmp_eq; // ConI(#CC_EQ) @@ -343,6 +342,10 @@ 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 PointsToNode* ptnode_adr(int idx) const { // There should be no new ideal nodes during ConnectionGraph build, @@ -365,12 +368,6 @@ // Add PointsToNode node corresponding to a 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. void add_node_to_connection_graph(Node *n, Unique_Node_List *delayed_worklist); @@ -594,6 +591,12 @@ 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); bool add_final_edges_unsafe_access(Node* n, uint opcode);