RFR: 8347449: C2: UseLoopPredicate off should also turn UseProfiledLoopPredicate off [v6]
Manuel Hässig
duke at openjdk.org
Wed Apr 2 06:32:10 UTC 2025
On Fri, 28 Mar 2025 09:09:59 GMT, Manuel Hässig <duke at openjdk.org> wrote:
>> # Issue Summary
>>
>> When running with `-XX:-UseLoopPredicate` C2 still inserts profiled loop parse predicates, despite those being a form of loop parse predicate. Further, the loop predicate code is not always consistent when to insert/expect profiled parse predicates.
>>
>> # Change Summary
>>
>> Following the rationale, that profiled predicates are a subset of loop predicates, this PR disables profiled predicates whenever loop predicates are disabled. They are disabled on the level of arguments. Further, before any checks for whether profiled predicates are enabled, this PR inserts a check that loop predicates are enabled such that the code is consistent in its intention.
>>
>> Concretel, this PR
>> - adds parse predicate nodes to the IR testing framework,
>> - turns off `UseProfiledLoopPredicate` if `UseLoopPredicate` is turned off,
>> - predicates all checks for `UseProfiledLoopPredicate`on `UseLoopPredicate` first for consistency,
>> - adds a regression test.
>>
>>
>> # Testing
>>
>> The changes passed the following testing:
>> - [Github Actions](https://github.com/mhaessig/jdk/actions/runs/14078750038)
>> - tier1 through tier3 and Oracle internal testing
>
> Manuel Hässig has updated the pull request incrementally with two additional commits since the last revision:
>
> - idealKit::loop: always call add_parse_predicates
>
> It was contstrained on UseParsePredicate, but this is incorrect, since
> all parse predicates are added in that function.
> - Improve description of UseLoopPredicate argument
Thank y'all for the thorough review!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24248#issuecomment-2771461584
More information about the hotspot-compiler-dev
mailing list