mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
7125896: Eliminate nested locks
Nested locks elimination done before lock nodes expansion by looking for outer locks of the same object. Reviewed-by: never, twisti
This commit is contained in:
parent
f99fb50071
commit
94927c382b
17 changed files with 366 additions and 145 deletions
|
@ -1819,8 +1819,12 @@ PhiNode *Parse::ensure_phi(int idx, bool nocreate) {
|
|||
} else if (jvms->is_stk(idx)) {
|
||||
t = block()->stack_type_at(idx - jvms->stkoff());
|
||||
} else if (jvms->is_mon(idx)) {
|
||||
assert(!jvms->is_monitor_box(idx), "no phis for boxes");
|
||||
t = TypeInstPtr::BOTTOM; // this is sufficient for a lock object
|
||||
if (EliminateNestedLocks && jvms->is_monitor_box(idx)) {
|
||||
// BoxLock nodes are not commoning. Create Phi.
|
||||
t = o->bottom_type(); // TypeRawPtr::BOTTOM
|
||||
} else {
|
||||
t = TypeInstPtr::BOTTOM; // this is sufficient for a lock object
|
||||
}
|
||||
} else if ((uint)idx < TypeFunc::Parms) {
|
||||
t = o->bottom_type(); // Type::RETURN_ADDRESS or such-like.
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue