RFR: 8324969: C2: prevent elimination of unbalanced coarsened locking regions [v7]

Vladimir Kozlov kvn at openjdk.org
Mon Feb 26 20:29:46 UTC 2024


On Mon, 26 Feb 2024 11:06:13 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> Could the box be nested at this point? If so, the assert inside set_local could trigger, right?

No, it can't be nested.
Check for nesting and its elimination is done in one place from which it does not escape [macro.cpp#L2047](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/macro.cpp#L2047)
(Nested state is set only when `is_nested_lock_region()` returns true in the check).
And it will be overwritten immediately by `box_node->set_eliminated()`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17697#discussion_r1503222549


More information about the hotspot-compiler-dev mailing list