RFR: 8305635: Replace Parse Predicate IfNode with new ParsePredicateNode and route predicate queries through dedicated classes

Christian Hagedorn chagedorn at openjdk.org
Tue May 16 15:34:59 UTC 2023


This is the second PR towards fixing the issues with Assertion Predicates ([JDK-8288981](https://bugs.openjdk.org/browse/JDK-8288981)). This patch still does not change anything in the way the old Assertion Predicates work. The only observable change in the IR is the introduction of a new `ParsePredicateNode` instead of using an `IfNode` to better distinguish these dedicated Parse Predicates added during parsing (they still use the same inputs with `Opaque1Nodes` as before).

Changes include:
- New `ParsePredicateNode` as subclass of `IfNode` and related code updates to make this work.
- Moving predicate access code (skipping, matching etc.), including the called predicate methods found in `PhaseIdealLoop`, to dedicated `Predicates/ParsePredicates` classes. This is only a first step and these classes are further updated in the next PR. They can therefore be seen as an intermediate state to make the entire update to predicate classes easier to follow. As a consequence, I've tried to not clean the code up too much in these classes.
  - Cleanup of touched code (dead code, variable renaming, code style)
  -  Added comments (e.g. for some special case in Loop Predication)

For more background, have a look at the first PR: #13864

Thanks,
Christian

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

Commit messages:
 - 8305635: Replace Parse Predicate IfNode with new ParsePredicateNode and route predicate queries through dedicated classes

Changes: https://git.openjdk.org/jdk/pull/14017/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14017&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8305635
  Stats: 623 lines in 12 files changed: 295 ins; 195 del; 133 mod
  Patch: https://git.openjdk.org/jdk/pull/14017.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14017/head:pull/14017

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


More information about the hotspot-compiler-dev mailing list