RFR: 8347449: C2: UseLoopPredicate off should also turn UseProfiledLoopPredicate off [v3]

Manuel Hässig duke at openjdk.org
Wed Mar 26 14:34:47 UTC 2025


> # 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 one additional commit since the last revision:

  ir-framework: rename new nodes to convention

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24248/files
  - new: https://git.openjdk.org/jdk/pull/24248/files/08afa3d5..6f015a67

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

  Stats: 10 lines in 2 files changed: 0 ins; 0 del; 10 mod
  Patch: https://git.openjdk.org/jdk/pull/24248.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24248/head:pull/24248

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


More information about the hotspot-dev mailing list