author | kvn |
Sat, 06 Nov 2010 20:35:36 -0700 | |
changeset 7122 | 23b82ce71b4e |
parent 5914 | 8363e7e6915a |
child 7397 | 5b173b4ca846 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4471
diff
changeset
|
2 |
* Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4471
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4471
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4471
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
25 |
// |
|
26 |
// Adaptation for C2 of the escape analysis algorithm described in: |
|
27 |
// |
|
238 | 28 |
// [Choi99] Jong-Deok Shoi, Manish Gupta, Mauricio Seffano, |
29 |
// Vugranam C. Sreedhar, Sam Midkiff, |
|
30 |
// "Escape Analysis for Java", Procedings of ACM SIGPLAN |
|
31 |
// OOPSLA Conference, November 1, 1999 |
|
1 | 32 |
// |
33 |
// The flow-insensitive analysis described in the paper has been implemented. |
|
34 |
// |
|
238 | 35 |
// The analysis requires construction of a "connection graph" (CG) for |
36 |
// the method being analyzed. The nodes of the connection graph are: |
|
1 | 37 |
// |
38 |
// - Java objects (JO) |
|
39 |
// - Local variables (LV) |
|
40 |
// - Fields of an object (OF), these also include array elements |
|
41 |
// |
|
42 |
// The CG contains 3 types of edges: |
|
43 |
// |
|
238 | 44 |
// - PointsTo (-P>) {LV, OF} to JO |
45 |
// - Deferred (-D>) from {LV, OF} to {LV, OF} |
|
1 | 46 |
// - Field (-F>) from JO to OF |
47 |
// |
|
48 |
// The following utility functions is used by the algorithm: |
|
49 |
// |
|
238 | 50 |
// PointsTo(n) - n is any CG node, it returns the set of JO that n could |
51 |
// point to. |
|
1 | 52 |
// |
238 | 53 |
// The algorithm describes how to construct the connection graph |
54 |
// in the following 4 cases: |
|
1 | 55 |
// |
56 |
// Case Edges Created |
|
57 |
// |
|
238 | 58 |
// (1) p = new T() LV -P> JO |
59 |
// (2) p = q LV -D> LV |
|
60 |
// (3) p.f = q JO -F> OF, OF -D> LV |
|
61 |
// (4) p = q.f JO -F> OF, LV -D> OF |
|
1 | 62 |
// |
238 | 63 |
// In all these cases, p and q are local variables. For static field |
64 |
// references, we can construct a local variable containing a reference |
|
65 |
// to the static memory. |
|
1 | 66 |
// |
67 |
// C2 does not have local variables. However for the purposes of constructing |
|
68 |
// the connection graph, the following IR nodes are treated as local variables: |
|
69 |
// Phi (pointer values) |
|
70 |
// LoadP |
|
238 | 71 |
// Proj#5 (value returned from callnodes including allocations) |
72 |
// CheckCastPP, CastPP |
|
1 | 73 |
// |
238 | 74 |
// The LoadP, Proj and CheckCastPP behave like variables assigned to only once. |
75 |
// Only a Phi can have multiple assignments. Each input to a Phi is treated |
|
1 | 76 |
// as an assignment to it. |
77 |
// |
|
238 | 78 |
// The following node types are JavaObject: |
1 | 79 |
// |
80 |
// top() |
|
81 |
// Allocate |
|
82 |
// AllocateArray |
|
83 |
// Parm (for incoming arguments) |
|
238 | 84 |
// CastX2P ("unsafe" operations) |
1 | 85 |
// CreateEx |
86 |
// ConP |
|
87 |
// LoadKlass |
|
238 | 88 |
// ThreadLocal |
1 | 89 |
// |
90 |
// AddP nodes are fields. |
|
91 |
// |
|
92 |
// After building the graph, a pass is made over the nodes, deleting deferred |
|
93 |
// nodes and copying the edges from the target of the deferred edge to the |
|
94 |
// source. This results in a graph with no deferred edges, only: |
|
95 |
// |
|
96 |
// LV -P> JO |
|
238 | 97 |
// OF -P> JO (the object whose oop is stored in the field) |
1 | 98 |
// JO -F> OF |
99 |
// |
|
100 |
// Then, for each node which is GlobalEscape, anything it could point to |
|
101 |
// is marked GlobalEscape. Finally, for any node marked ArgEscape, anything |
|
102 |
// it could point to is marked ArgEscape. |
|
103 |
// |
|
104 |
||
105 |
class Compile; |
|
106 |
class Node; |
|
107 |
class CallNode; |
|
108 |
class PhiNode; |
|
109 |
class PhaseTransform; |
|
110 |
class Type; |
|
111 |
class TypePtr; |
|
112 |
class VectorSet; |
|
113 |
||
114 |
class PointsToNode { |
|
115 |
friend class ConnectionGraph; |
|
116 |
public: |
|
117 |
typedef enum { |
|
238 | 118 |
UnknownType = 0, |
119 |
JavaObject = 1, |
|
120 |
LocalVar = 2, |
|
121 |
Field = 3 |
|
1 | 122 |
} NodeType; |
123 |
||
124 |
typedef enum { |
|
125 |
UnknownEscape = 0, |
|
238 | 126 |
NoEscape = 1, // A scalar replaceable object with unique type. |
127 |
ArgEscape = 2, // An object passed as argument or referenced by |
|
128 |
// argument (and not globally escape during call). |
|
129 |
GlobalEscape = 3 // An object escapes the method and thread. |
|
1 | 130 |
} EscapeState; |
131 |
||
132 |
typedef enum { |
|
133 |
UnknownEdge = 0, |
|
134 |
PointsToEdge = 1, |
|
135 |
DeferredEdge = 2, |
|
136 |
FieldEdge = 3 |
|
137 |
} EdgeType; |
|
138 |
||
139 |
private: |
|
140 |
enum { |
|
141 |
EdgeMask = 3, |
|
142 |
EdgeShift = 2, |
|
143 |
||
144 |
INITIAL_EDGE_COUNT = 4 |
|
145 |
}; |
|
146 |
||
147 |
NodeType _type; |
|
148 |
EscapeState _escape; |
|
238 | 149 |
GrowableArray<uint>* _edges; // outgoing edges |
1 | 150 |
|
151 |
public: |
|
238 | 152 |
Node* _node; // Ideal node corresponding to this PointsTo node. |
153 |
int _offset; // Object fields offsets. |
|
154 |
bool _scalar_replaceable;// Not escaped object could be replaced with scalar |
|
155 |
bool _hidden_alias; // This node is an argument to a function. |
|
156 |
// which may return it creating a hidden alias. |
|
1 | 157 |
|
238 | 158 |
PointsToNode(): |
159 |
_type(UnknownType), |
|
160 |
_escape(UnknownEscape), |
|
161 |
_edges(NULL), |
|
162 |
_node(NULL), |
|
163 |
_offset(-1), |
|
164 |
_scalar_replaceable(true), |
|
165 |
_hidden_alias(false) {} |
|
1 | 166 |
|
167 |
||
168 |
EscapeState escape_state() const { return _escape; } |
|
169 |
NodeType node_type() const { return _type;} |
|
170 |
int offset() { return _offset;} |
|
171 |
||
172 |
void set_offset(int offs) { _offset = offs;} |
|
173 |
void set_escape_state(EscapeState state) { _escape = state; } |
|
174 |
void set_node_type(NodeType ntype) { |
|
175 |
assert(_type == UnknownType || _type == ntype, "Can't change node type"); |
|
176 |
_type = ntype; |
|
177 |
} |
|
178 |
||
179 |
// count of outgoing edges |
|
180 |
uint edge_count() const { return (_edges == NULL) ? 0 : _edges->length(); } |
|
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
181 |
|
1 | 182 |
// node index of target of outgoing edge "e" |
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
183 |
uint edge_target(uint e) const { |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
184 |
assert(_edges != NULL, "valid edge index"); |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
185 |
return (_edges->at(e) >> EdgeShift); |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
186 |
} |
1 | 187 |
// type of outgoing edge "e" |
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
188 |
EdgeType edge_type(uint e) const { |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
189 |
assert(_edges != NULL, "valid edge index"); |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
190 |
return (EdgeType) (_edges->at(e) & EdgeMask); |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
191 |
} |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
192 |
|
1 | 193 |
// add a edge of the specified type pointing to the specified target |
194 |
void add_edge(uint targIdx, EdgeType et); |
|
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
195 |
|
1 | 196 |
// remove an edge of the specified type pointing to the specified target |
197 |
void remove_edge(uint targIdx, EdgeType et); |
|
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
198 |
|
1 | 199 |
#ifndef PRODUCT |
961
7fb3b13d4205
6726999: nsk/stress/jck12a/jck12a010 assert(n != null,"Bad immediate dominator info.")
kvn
parents:
953
diff
changeset
|
200 |
void dump(bool print_state=true) const; |
1 | 201 |
#endif |
202 |
||
203 |
}; |
|
204 |
||
205 |
class ConnectionGraph: public ResourceObj { |
|
206 |
private: |
|
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
207 |
GrowableArray<PointsToNode> _nodes; // Connection graph nodes indexed |
238 | 208 |
// by ideal node index. |
1 | 209 |
|
238 | 210 |
Unique_Node_List _delayed_worklist; // Nodes to be processed before |
211 |
// the call build_connection_graph(). |
|
212 |
||
4470
1e6edcab3109
6895383: JCK test throws NPE for method compiled with Escape Analysis
kvn
parents:
1055
diff
changeset
|
213 |
GrowableArray<MergeMemNode *> _mergemem_worklist; // List of all MergeMem nodes |
1e6edcab3109
6895383: JCK test throws NPE for method compiled with Escape Analysis
kvn
parents:
1055
diff
changeset
|
214 |
|
238 | 215 |
VectorSet _processed; // Records which nodes have been |
216 |
// processed. |
|
1 | 217 |
|
238 | 218 |
bool _collecting; // Indicates whether escape information |
219 |
// is still being collected. If false, |
|
220 |
// no new nodes will be processed. |
|
221 |
||
7122 | 222 |
bool _progress; // Indicates whether new Graph's edges |
223 |
// were created. |
|
224 |
||
238 | 225 |
uint _phantom_object; // Index of globally escaping object |
226 |
// that pointer values loaded from |
|
227 |
// a field which has not been set |
|
228 |
// are assumed to point to. |
|
961
7fb3b13d4205
6726999: nsk/stress/jck12a/jck12a010 assert(n != null,"Bad immediate dominator info.")
kvn
parents:
953
diff
changeset
|
229 |
uint _oop_null; // ConP(#NULL) |
7fb3b13d4205
6726999: nsk/stress/jck12a/jck12a010 assert(n != null,"Bad immediate dominator info.")
kvn
parents:
953
diff
changeset
|
230 |
uint _noop_null; // ConN(#NULL) |
238 | 231 |
|
232 |
Compile * _compile; // Compile object for current compilation |
|
5914
8363e7e6915a
6966411: escape.cpp:450 assert(base->Opcode() == Op_ConP
kvn
parents:
5547
diff
changeset
|
233 |
PhaseIterGVN * _igvn; // Value numbering |
1 | 234 |
|
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
235 |
// Address of an element in _nodes. Used when the element is to be modified |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
236 |
PointsToNode *ptnode_adr(uint idx) const { |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
237 |
// There should be no new ideal nodes during ConnectionGraph build, |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
238 |
// growableArray::adr_at() will throw assert otherwise. |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
239 |
return _nodes.adr_at(idx); |
1 | 240 |
} |
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
241 |
uint nodes_size() const { return _nodes.length(); } |
1 | 242 |
|
238 | 243 |
// Add node to ConnectionGraph. |
244 |
void add_node(Node *n, PointsToNode::NodeType nt, PointsToNode::EscapeState es, bool done); |
|
245 |
||
1 | 246 |
// offset of a field reference |
238 | 247 |
int address_offset(Node* adr, PhaseTransform *phase); |
1 | 248 |
|
249 |
// compute the escape state for arguments to a call |
|
250 |
void process_call_arguments(CallNode *call, PhaseTransform *phase); |
|
251 |
||
252 |
// compute the escape state for the return value of a call |
|
253 |
void process_call_result(ProjNode *resproj, PhaseTransform *phase); |
|
254 |
||
238 | 255 |
// Populate Connection Graph with Ideal nodes. |
256 |
void record_for_escape_analysis(Node *n, PhaseTransform *phase); |
|
1 | 257 |
|
238 | 258 |
// Build Connection Graph and set nodes escape state. |
259 |
void build_connection_graph(Node *n, PhaseTransform *phase); |
|
1 | 260 |
|
261 |
// walk the connection graph starting at the node corresponding to "n" and |
|
262 |
// add the index of everything it could point to, to "ptset". This may cause |
|
263 |
// Phi's encountered to get (re)processed (which requires "phase".) |
|
5914
8363e7e6915a
6966411: escape.cpp:450 assert(base->Opcode() == Op_ConP
kvn
parents:
5547
diff
changeset
|
264 |
void PointsTo(VectorSet &ptset, Node * n); |
1 | 265 |
|
266 |
// Edge manipulation. The "from_i" and "to_i" arguments are the |
|
267 |
// node indices of the source and destination of the edge |
|
268 |
void add_pointsto_edge(uint from_i, uint to_i); |
|
269 |
void add_deferred_edge(uint from_i, uint to_i); |
|
270 |
void add_field_edge(uint from_i, uint to_i, int offs); |
|
271 |
||
7122 | 272 |
// Add an edge of the specified type pointing to the specified target. |
273 |
// Set _progress if new edge is added. |
|
274 |
void add_edge(PointsToNode *f, uint to_i, PointsToNode::EdgeType et) { |
|
275 |
uint e_cnt = f->edge_count(); |
|
276 |
f->add_edge(to_i, et); |
|
277 |
_progress |= (f->edge_count() != e_cnt); |
|
278 |
} |
|
1 | 279 |
|
280 |
// Add an edge to node given by "to_i" from any field of adr_i whose offset |
|
281 |
// matches "offset" A deferred edge is added if to_i is a LocalVar, and |
|
282 |
// a pointsto edge is added if it is a JavaObject |
|
283 |
void add_edge_from_fields(uint adr, uint to_i, int offs); |
|
284 |
||
238 | 285 |
// Add a deferred edge from node given by "from_i" to any field |
286 |
// of adr_i whose offset matches "offset" |
|
1 | 287 |
void add_deferred_edge_to_fields(uint from_i, uint adr, int offs); |
288 |
||
289 |
||
290 |
// Remove outgoing deferred edges from the node referenced by "ni". |
|
291 |
// Any outgoing edges from the target of the deferred edge are copied |
|
292 |
// to "ni". |
|
348
905c4cbf5d6a
6681577: PIT: some VM tests fails with -XX:+AggressiveOpts in 6u5p b01
kvn
parents:
238
diff
changeset
|
293 |
void remove_deferred(uint ni, GrowableArray<uint>* deferred_edges, VectorSet* visited); |
1 | 294 |
|
295 |
Node_Array _node_map; // used for bookeeping during type splitting |
|
296 |
// Used for the following purposes: |
|
297 |
// Memory Phi - most recent unique Phi split out |
|
298 |
// from this Phi |
|
299 |
// MemNode - new memory input for this node |
|
300 |
// ChecCastPP - allocation that this is a cast of |
|
301 |
// allocation - CheckCastPP of the allocation |
|
1055
f4fb9fb08038
6731641: assert(m->adr_type() == mach->adr_type(),"matcher should not change adr type")
kvn
parents:
961
diff
changeset
|
302 |
bool split_AddP(Node *addp, Node *base, PhaseGVN *igvn); |
1 | 303 |
PhiNode *create_split_phi(PhiNode *orig_phi, int alias_idx, GrowableArray<PhiNode *> &orig_phi_worklist, PhaseGVN *igvn, bool &new_created); |
304 |
PhiNode *split_memory_phi(PhiNode *orig_phi, int alias_idx, GrowableArray<PhiNode *> &orig_phi_worklist, PhaseGVN *igvn); |
|
4471
78c7cc2ae5dd
6896727: nsk/logging/LoggingPermission/LoggingPermission/logperm002 fails with G1, EscapeAnalisys
kvn
parents:
4470
diff
changeset
|
305 |
void move_inst_mem(Node* n, GrowableArray<PhiNode *> &orig_phis, PhaseGVN *igvn); |
238 | 306 |
Node *find_inst_mem(Node *mem, int alias_idx,GrowableArray<PhiNode *> &orig_phi_worklist, PhaseGVN *igvn); |
307 |
||
1 | 308 |
// Propagate unique types created for unescaped allocated objects |
309 |
// through the graph |
|
310 |
void split_unique_types(GrowableArray<Node *> &alloc_worklist); |
|
311 |
||
312 |
// manage entries in _node_map |
|
313 |
void set_map(int idx, Node *n) { _node_map.map(idx, n); } |
|
314 |
Node *get_map(int idx) { return _node_map[idx]; } |
|
315 |
PhiNode *get_map_phi(int idx) { |
|
316 |
Node *phi = _node_map[idx]; |
|
317 |
return (phi == NULL) ? NULL : phi->as_Phi(); |
|
318 |
} |
|
319 |
||
320 |
// Notify optimizer that a node has been modified |
|
321 |
// Node: This assumes that escape analysis is run before |
|
322 |
// PhaseIterGVN creation |
|
323 |
void record_for_optimizer(Node *n) { |
|
5914
8363e7e6915a
6966411: escape.cpp:450 assert(base->Opcode() == Op_ConP
kvn
parents:
5547
diff
changeset
|
324 |
_igvn->_worklist.push(n); |
1 | 325 |
} |
326 |
||
327 |
// Set the escape state of a node |
|
328 |
void set_escape_state(uint ni, PointsToNode::EscapeState es); |
|
329 |
||
4470
1e6edcab3109
6895383: JCK test throws NPE for method compiled with Escape Analysis
kvn
parents:
1055
diff
changeset
|
330 |
// Search for objects which are not scalar replaceable. |
1e6edcab3109
6895383: JCK test throws NPE for method compiled with Escape Analysis
kvn
parents:
1055
diff
changeset
|
331 |
void verify_escape_state(int nidx, VectorSet& ptset, PhaseTransform* phase); |
1e6edcab3109
6895383: JCK test throws NPE for method compiled with Escape Analysis
kvn
parents:
1055
diff
changeset
|
332 |
|
1 | 333 |
public: |
5914
8363e7e6915a
6966411: escape.cpp:450 assert(base->Opcode() == Op_ConP
kvn
parents:
5547
diff
changeset
|
334 |
ConnectionGraph(Compile *C, PhaseIterGVN *igvn); |
1 | 335 |
|
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
336 |
// Check for non-escaping candidates |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
337 |
static bool has_candidates(Compile *C); |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
338 |
|
5914
8363e7e6915a
6966411: escape.cpp:450 assert(base->Opcode() == Op_ConP
kvn
parents:
5547
diff
changeset
|
339 |
// Perform escape analysis |
8363e7e6915a
6966411: escape.cpp:450 assert(base->Opcode() == Op_ConP
kvn
parents:
5547
diff
changeset
|
340 |
static void do_analysis(Compile *C, PhaseIterGVN *igvn); |
8363e7e6915a
6966411: escape.cpp:450 assert(base->Opcode() == Op_ConP
kvn
parents:
5547
diff
changeset
|
341 |
|
238 | 342 |
// Compute the escape information |
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
343 |
bool compute_escape(); |
1 | 344 |
|
345 |
// escape state of a node |
|
5914
8363e7e6915a
6966411: escape.cpp:450 assert(base->Opcode() == Op_ConP
kvn
parents:
5547
diff
changeset
|
346 |
PointsToNode::EscapeState escape_state(Node *n); |
8363e7e6915a
6966411: escape.cpp:450 assert(base->Opcode() == Op_ConP
kvn
parents:
5547
diff
changeset
|
347 |
|
238 | 348 |
// other information we have collected |
349 |
bool is_scalar_replaceable(Node *n) { |
|
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
350 |
if (_collecting || (n->_idx >= nodes_size())) |
238 | 351 |
return false; |
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
352 |
PointsToNode* ptn = ptnode_adr(n->_idx); |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
353 |
return ptn->escape_state() == PointsToNode::NoEscape && ptn->_scalar_replaceable; |
238 | 354 |
} |
1 | 355 |
|
356 |
bool hidden_alias(Node *n) { |
|
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
357 |
if (_collecting || (n->_idx >= nodes_size())) |
1 | 358 |
return true; |
952
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
359 |
PointsToNode* ptn = ptnode_adr(n->_idx); |
38812d18eec0
6684714: Optimize EA Connection Graph build performance
kvn
parents:
348
diff
changeset
|
360 |
return (ptn->escape_state() != PointsToNode::NoEscape) || ptn->_hidden_alias; |
1 | 361 |
} |
362 |
||
363 |
#ifndef PRODUCT |
|
364 |
void dump(); |
|
365 |
#endif |
|
366 |
}; |