RFR: 8370220: C2: rename methods and improve documentation around get_ctrl and idom lazy updating/forwarding of ctrl and idom via dead ctrl nodes [v2]

Emanuel Peter epeter at openjdk.org
Tue Oct 21 06:57:28 UTC 2025


> When working on https://github.com/openjdk/jdk/pull/27889, I was irritated by the lack of documentation and suboptimal naming.
> 
> Here, I'm doing the following:
> - Add more documentation, and improve it in other cases.
> - Rename "lazy" methods: "lazy" could indicate that we delay it somehow until later, but it is unclear what is delayed.
>   - `lazy_replace` -> `replace_ctrl_node_and_forward_ctrl_and_idom`
>   - `lazy_update` -> `install_lazy_ctrl_and_idom_forwarding`
> - Made some methods private, and added some additional asserts.
> 
> I'd be more than happy for even better names, and suggestions how to improve the documentation further :)
> 
> Related issues:
> https://github.com/openjdk/jdk/pull/27889
> https://github.com/openjdk/jdk/pull/15720
> 
> TODO: improve `VerifyLoopOptimizations` to check that we can call `get_ctrl` on all live nodes after loop-opts.

Emanuel Peter 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 eight additional commits since the last revision:

 - Merge branch 'master' into JDK-8370220-get-ctrl-documentation
 - code style
 - missing part
 - rename lazy methods
 - make helper method private
 - wip documentation and renaming
 - more documentation
 - JDK-8370220

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/27892/files
  - new: https://git.openjdk.org/jdk/pull/27892/files/21911dc4..c3ab0698

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=27892&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27892&range=00-01

  Stats: 20763 lines in 619 files changed: 10651 ins; 7255 del; 2857 mod
  Patch: https://git.openjdk.org/jdk/pull/27892.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27892/head:pull/27892

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


More information about the hotspot-compiler-dev mailing list