RFR: 8353290: C2: Refactor PhaseIdealLoop::is_counted_loop() [v2]

Christian Hagedorn chagedorn at openjdk.org
Fri Apr 11 08:24:27 UTC 2025


On Fri, 11 Apr 2025 08:15:20 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> I disagree: I don't want to confuse it with `CountedLoopNode` or making it looks like extending from `IdealLoopTree`. Besides it wouldn't not necessarily guarantee a counted loop until confirmed by `is_counted_loop()`
>
> What I had in mind was something like that (I'm also fine with `CountedLoopConverter`:
> 
> CountedLoop counted_loop(...);
> counted_loop.convert();
> return counted_loop.is_valid();
> 
> But maybe you can explain in more detail what the follow-up work will be and how you use this class again later?

About the placement of this class. You could probably also move it out of the already huge `PhaseIdealLoop` class to make it a non-inner class, if there is not some strong coupling that you absolutely need.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24458#discussion_r2039049623


More information about the hotspot-compiler-dev mailing list