RFR: 8353290: C2: Refactor PhaseIdealLoop::is_counted_loop() [v9]
Kangcheng Xu
kxu at openjdk.org
Mon Sep 22 15:41:40 UTC 2025
> This PR refactors `PhaseIdealLoop::is_counted_loop()` into (mostly) `CountedLoopConverter::is_counted_loop()` and `CountedLoopConverter::convert()` to decouple the detection and conversion code. This enables us to try different loop configurations easily and finally convert once a counted loop is found.
>
> A nested `PhaseIdealLoop::CountedLoopConverter` class is created to handle the context, but I'm not if this is the best name or place for it. Please let me know what you think.
>
> Blocks [JDK-8336759](https://bugs.openjdk.org/browse/JDK-8336759).
Kangcheng Xu has updated the pull request incrementally with two additional commits since the last revision:
- WIP: refactor structs to classes
- WIP: removed dead code, renamed fields and signatures
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/24458/files
- new: https://git.openjdk.org/jdk/pull/24458/files/763adeda..5fd98f48
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=24458&range=08
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=24458&range=07-08
Stats: 564 lines in 3 files changed: 275 ins; 187 del; 102 mod
Patch: https://git.openjdk.org/jdk/pull/24458.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24458/head:pull/24458
PR: https://git.openjdk.org/jdk/pull/24458
More information about the hotspot-compiler-dev
mailing list