RFR: 8366357: C2 SuperWord: refactor VTransformNode::apply with VTransformApplyState

Emanuel Peter epeter at openjdk.org
Thu Aug 28 13:19:07 UTC 2025


I'm working on **cost-modeling**, and am integrating some smaller changes from this proof-of-concept PR: https://github.com/openjdk/jdk/pull/20964

This is a **pure refactoring** - no change in behaviour. I'm presenting it like this because it will make reviews easier.

The goal here is that `VTransformNode::apply` only needs a single argument. This is important, as we will soon add more components that need to be updated during apply. That way, we can simply add more parts to `VTransformApplyState`, and do not need to add more arguments to VTransformNode::apply.

And yes: I have considering passing the `apply_state` as `const`. While this may be possible with the current code state, the upcoming changes from https://github.com/openjdk/jdk/pull/20964 will require non-const access to the `apply_state` (e.g. for `set_memory_state`).

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

Commit messages:
 - JDK-8366357

Changes: https://git.openjdk.org/jdk/pull/26987/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26987&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8366357
  Stats: 123 lines in 3 files changed: 32 ins; 26 del; 65 mod
  Patch: https://git.openjdk.org/jdk/pull/26987.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26987/head:pull/26987

PR: https://git.openjdk.org/jdk/pull/26987


More information about the hotspot-compiler-dev mailing list