mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-27 15:20:53 +00:00
Take into consideration dead paths
This commit is contained in:
parent
0cfc9aeece
commit
b6b326636e
@ -121,7 +121,7 @@ bool MemNode::check_not_escaped(PhaseValues* phase, Unique_Node_List& aliases, A
|
||||
}
|
||||
|
||||
// Find all control nodes from ctl to alloc, alloc must dominate ctl, which means all paths from
|
||||
// ctl must arrive at alloc
|
||||
// ctl must arrive at alloc, or a dead end
|
||||
ResourceMark rm;
|
||||
Unique_Node_List controls;
|
||||
controls.push(ctl);
|
||||
@ -147,6 +147,11 @@ bool MemNode::check_not_escaped(PhaseValues* phase, Unique_Node_List& aliases, A
|
||||
}
|
||||
}
|
||||
|
||||
if (!controls.member(alloc)) {
|
||||
// If there is no control path from ctl to alloc, ctl is a dead path, give up
|
||||
return false;
|
||||
}
|
||||
|
||||
// Find all nodes that may escape alloc, and see whether they may be between ctl and alloc
|
||||
for (uint idx = 0; idx < aliases.size(); idx++) {
|
||||
Node* n = aliases.at(idx);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user