RFR: 8327963: C2: fix construction of memory graph around Initialize node to prevent incorrect execution if allocation is removed [v8]

Roland Westrelin roland at openjdk.org
Thu Jun 12 15:42:35 UTC 2025


On Mon, 9 Jun 2025 06:54:34 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> I think it would be good (although not necessarily in the context of this PR) to establish the "no duplicate memory projection" invariant in the back-end, for sanity and to make sure we do not break any logic that might be implicitly relying on it. If you agree, could you file a follow-up RFE, ideally with a reproducer where the current logic fails to remove `NarrowMemProj`s?

One way would be to simply assert that there's no `NarrowMemProj`s left during final graph reshape. Is that what you'd like?
Stepping back, what's the concern here? The new projections should mostly be harmless.

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

PR Comment: https://git.openjdk.org/jdk/pull/24570#issuecomment-2967339435


More information about the hotspot-compiler-dev mailing list