[lworld] RFR: 8262287: [lworld] C2 compilation fails with assert "should have been removed from the graph"

Tobias Hartmann thartmann at openjdk.java.net
Fri Mar 5 07:49:00 UTC 2021


On Thu, 4 Mar 2021 16:31:42 GMT, Roland Westrelin <roland at openjdk.org> wrote:

> hook_memory_on_init() sets up memory edges so stores can be captured
> at an allocation. To do that, it adds extra edges for each field after
> and before the InitializeNode. This also happens for flat arrays
> eventhough until Compile::adjust_flattened_array_access_aliases() runs
> there's a single slice for all fields of a flat array element. The
> extra edges added after the InitalizeNode can cause PhiNodes to be
> created for each fields of the array element which confuses
> Compile::adjust_flattened_array_access_aliases() (because it expects
> no Phi for individual fields until it runs). I don't think the memory
> edges out of the InitializeNode are needed as
> Compile::adjust_flattened_array_access_aliases() should create
> them. So I propose not adding them.

Looks good to me. Some comments wouldn't hurt though :) and but could you please add the regression test? You can simply add it to `jtreg/compiler/valhalla/inlinetypes/TestGenerated.java` where the generated tests live.

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

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


More information about the valhalla-dev mailing list