[lworld] RFR: 8275583: [lworld] C2 fails to scalarize inline types in safepoint debug info in rare cases [v2]
Tobias Hartmann
thartmann at openjdk.java.net
Wed Oct 20 11:29:48 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
Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:
Unrelated fix: Use vk type when checking that casts can be pushed through
-------------
Changes:
- all: https://git.openjdk.java.net/valhalla/pull/568/files
- new: https://git.openjdk.java.net/valhalla/pull/568/files/d5c4acac..1514473d
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=568&range=01
- incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=568&range=00-01
Stats: 13 lines in 1 file changed: 9 ins; 3 del; 1 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