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

Tobias Hartmann thartmann at openjdk.org
Thu Apr 11 13:25:21 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

Tobias Hartmann has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:

 - Merge branch 'lworld' into JDK-8329196
 - Fixing constructor to constructor calls and added more tests
 - Handling abstract value class constructors with arguments
 - Disabled IR verification due to JDK-8329234
 - Merge branch 'lworld' into JDK-8329196
 - More fixes, refactoring
 - First prototype

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

Changes:
  - all: https://git.openjdk.org/valhalla/pull/1064/files
  - new: https://git.openjdk.org/valhalla/pull/1064/files/b18ec2fe..610c6aa4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1064&range=03
 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1064&range=02-03

  Stats: 1872 lines in 63 files changed: 621 ins; 1081 del; 170 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