[lworld] Integrated: 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 13:10:32 UTC 2021


On Wed, 20 Oct 2021 10:17:22 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: 3354fc04
Author:    Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.java.net/valhalla/commit/3354fc048ce0395c6ab512263313d8fb18583b22
Stats:     61 lines in 7 files changed: 38 ins; 20 del; 3 mod

8275583: [lworld] C2 fails to scalarize inline types in safepoint debug info in rare cases

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

PR: https://git.openjdk.java.net/valhalla/pull/568



More information about the valhalla-dev mailing list