Mercurial > hg > truffle
comparison src/share/vm/opto/memnode.cpp @ 155:723be81c1212
6701887: JDK7 server VM in endless loop in Node::dominates
Summary: The method Node::dominates loops in the dead code which does not have a Region node.
Reviewed-by: jrose, never
author | kvn |
---|---|
date | Thu, 15 May 2008 22:43:11 -0700 |
parents | a76240c8b133 |
children | 885ed790ecf0 |
comparison
equal
deleted
inserted
replaced
154:09c2ba680204 | 155:723be81c1212 |
---|---|
254 // Check 'dom'. | 254 // Check 'dom'. |
255 dom = dom->find_exact_control(dom); | 255 dom = dom->find_exact_control(dom); |
256 if (dom == NULL || dom->is_top()) | 256 if (dom == NULL || dom->is_top()) |
257 return false; // Conservative answer for dead code | 257 return false; // Conservative answer for dead code |
258 | 258 |
259 if (dom->is_Start() || dom->is_Root() || dom == sub) | 259 if (dom->is_Con() || dom->is_Start() || dom->is_Root() || dom == sub) |
260 return true; | 260 return true; |
261 | 261 |
262 // 'dom' dominates 'sub' if its control edge and control edges | 262 // 'dom' dominates 'sub' if its control edge and control edges |
263 // of all its inputs dominate or equal to sub's control edge. | 263 // of all its inputs dominate or equal to sub's control edge. |
264 | 264 |
296 n = n->find_exact_control(n->in(0)); | 296 n = n->find_exact_control(n->in(0)); |
297 if (n == NULL || n->is_top()) | 297 if (n == NULL || n->is_top()) |
298 return false; // Conservative answer for dead code | 298 return false; // Conservative answer for dead code |
299 assert(n->is_CFG(), "expecting control"); | 299 assert(n->is_CFG(), "expecting control"); |
300 } | 300 } |
301 if (n->is_Start() || n->is_Root()) { | 301 if (n->is_Con() || n->is_Start() || n->is_Root()) { |
302 only_dominating_controls = true; | 302 only_dominating_controls = true; |
303 } else if (n->is_CFG()) { | 303 } else if (n->is_CFG()) { |
304 if (n->dominates(sub, nlist)) | 304 if (n->dominates(sub, nlist)) |
305 only_dominating_controls = true; | 305 only_dominating_controls = true; |
306 else | 306 else |
307 return false; | 307 return false; |
308 } else { | 308 } else { |
309 // First, own control edge. | 309 // First, own control edge. |
310 Node* m = n->find_exact_control(n->in(0)); | 310 Node* m = n->find_exact_control(n->in(0)); |
311 if (m == NULL) | 311 if (m != NULL) { |
312 continue; | 312 if (m->is_top()) |
313 if (m->is_top()) | 313 return false; // Conservative answer for dead code |
314 return false; // Conservative answer for dead code | 314 dom_list.push(m); |
315 dom_list.push(m); | 315 } |
316 | |
317 // Now, the rest of edges. | 316 // Now, the rest of edges. |
318 uint cnt = n->req(); | 317 uint cnt = n->req(); |
319 for (uint i = 1; i < cnt; i++) { | 318 for (uint i = 1; i < cnt; i++) { |
320 m = n->find_exact_control(n->in(i)); | 319 m = n->find_exact_control(n->in(i)); |
321 if (m == NULL || m->is_top()) | 320 if (m == NULL || m->is_top()) |