RFR: 8370077: C2: make Compile::_major_progress a boolean [v2]
Christian Hagedorn
chagedorn at openjdk.org
Wed Oct 22 08:32:43 UTC 2025
On Wed, 22 Oct 2025 07:42:51 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
>> There should just be some documentation around the `major_progress` family of field/methods. Or at least link from there to where the documentation resides ;)
>
> Probably, but that is out of the scope of this issue. Moreover, I don't know enough of loop optimization to write a helpful and correct comment. It feels like it should just be another RFE done by someone who can do it. The change I'm doing here doesn't actually need to understand how the whole thing works.
>
> Also
>> If we ever set the flag, we don't continue with more loop-opts, but spin back to IGVN, clean the graph, and maybe come back to a new loop-opts round.
>
> I don't think it's true. I have the same kind of intuition, but in details, I don't think it holds. We can unroll after peeling (which sets major progress) in the same loop optimization round.
> My understanding is that the flag is set if the loop-opts data-structures are invalid (or at least there is no guarantee that they are valid). So we need to re-build the loop tree.
Additionally, there are also cases where we think that we could apply more loop-opts even though the structures are still valid:
https://github.com/openjdk/jdk/blob/f475eb8ee7c9a3e360b2f1210ed71b629243cd2a/src/hotspot/share/opto/loopnode.cpp#L5113-L5119
One more reason that we should add some documentation about how we use `major_progress`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27912#discussion_r2450905429
More information about the hotspot-compiler-dev
mailing list