[lworld] RFR: 8275583: [lworld] C2 fails to scalarize inline types in safepoint debug info in rare cases
Tobias Hartmann
thartmann at openjdk.java.net
Wed Oct 20 10:23:36 UTC 2021
In rare cases, it can happen that inline types are not scalarized in safepoint debug info and we hit an assert. The problem is that `InlineTypeBaseNode::Ideal` is only called by IGVN if the node (or one of its inputs) has been modified but not if folding of output nodes leads to a direct connection to a SafePointNode. Usually, the node is still scalarized when we visit all inline type nodes via ` Compile::process_inline_types` but there are cases when that's too late and not scalarizing the node early (prevents other nodes from being removed (for example, during macro expansion).
The fix is to simply move the code to `SafePointNode::Ideal` which will be invoked whenever one of the (debug) inputs changed.
I also fixed an issue where `FastLockNodes` with an `InlineTypePtrNode` input are not folded and keep allocations alive.
Best regards,
Tobias
-------------
Commit messages:
- 8275583: [lworld] C2 fails to scalarize inline types in safepoint debug info in rare cases
Changes: https://git.openjdk.java.net/valhalla/pull/568/files
Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=568&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8275583
Stats: 48 lines in 6 files changed: 29 ins; 17 del; 2 mod
Patch: https://git.openjdk.java.net/valhalla/pull/568.diff
Fetch: git fetch https://git.openjdk.java.net/valhalla pull/568/head:pull/568
PR: https://git.openjdk.java.net/valhalla/pull/568
More information about the valhalla-dev
mailing list