[lworld] RFR: 8329196: [lworld] More fixes to value object construction in C2

Tobias Hartmann thartmann at openjdk.org
Thu Mar 28 07:41:51 UTC 2024


Follow-up from [JDK-8325660](https://bugs.openjdk.org/browse/JDK-8325660). We can't rely on `GraphKit::replace_in_map` to reliably replace an InlineTypeNode that is initialized in the constructor in the caller map because there can be data flow merges. Instead, we need to explicitly update the node in the exit map. I added corresponding regression tests.

I also noticed that we are extensively cloning InlineTypeNodes during parsing, which often leads to an explosion of redundant nodes that then need to be removed. I added `InlineTypeNode::clone_if_required` to mitigate this, this can probably be further improved (I added corresponding ToDo's).

There are still issues with deoptimization from the constructor (`-XX:+DeoptimizeALot`). I'll address these in another fix.

I also disabled an IR rule in `TestZGCBarrierElision`. The issue will be fixed by [JDK-8329234](https://bugs.openjdk.org/browse/JDK-8329234).

Thanks,
Tobias

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

Commit messages:
 - Disabled IR verification due to JDK-8329234
 - Merge branch 'lworld' into JDK-8329196
 - More fixes, refactoring
 - First prototype

Changes: https://git.openjdk.org/valhalla/pull/1064/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1064&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8329196
  Stats: 172 lines in 13 files changed: 124 ins; 10 del; 38 mod
  Patch: https://git.openjdk.org/valhalla/pull/1064.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1064/head:pull/1064

PR: https://git.openjdk.org/valhalla/pull/1064



More information about the valhalla-dev mailing list