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

Roland Westrelin roland at openjdk.java.net
Thu Mar 4 16:36:20 UTC 2021


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.

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

Commit messages:
 - fix

Changes: https://git.openjdk.java.net/valhalla/pull/361/files
 Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=361&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8262287
  Stats: 9 lines in 3 files changed: 7 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/valhalla/pull/361.diff
  Fetch: git fetch https://git.openjdk.java.net/valhalla pull/361/head:pull/361

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



More information about the valhalla-dev mailing list