RFR: 8283466: C2: missing skeleton predicates in peeled loop

Emanuel Peter duke at openjdk.java.net
Mon May 30 12:03:09 UTC 2022


Implemented initializing skeleton predicates for the peeled loop.

We have some predicates / checks before loops that are dependent on the range of the loop, they are checked at runtime. When we split a loop (eg. peeling, pre/main/post, unswitching) one of the sub-loops may get impossible data types and remove the data flow. For static type analysis for the control flow, we need so called skeleton predicates that implement these loop checks before each split off loop. If we do not do this static analysis we generally get `bad graph` asserts, as only removing data flow and not control flow leads to broken graphs.

This was already implemented for pre/main/post loops and loop unswitching, but not for peeling.

Ran large test suite.
Manual inspection shows that the instantiated skeleton predicate indeed collapses, in the provided regression test.

Rerunning some tests now...

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

Commit messages:
 - remove refactoring assert / old code
 - fixed comments after Christian's review
 - response to Christian's review comments
 - rename, is not known that it is actually loop node
 - fixed bug: only move dependency if it is the old node of a newly cloned loop_node
 - greatly reduced and commented test. And it should reproduce again after Rolands loop-incr type fix
 - small renaming and improved comments
 - small prettification
 - refactoring find_all_predicates to class Predicates
 - unnecessary code removal and renamings
 - ... and 2 more: https://git.openjdk.java.net/jdk/compare/47500b24...a4091b66

Changes: https://git.openjdk.java.net/jdk/pull/8783/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8783&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8283466
  Stats: 248 lines in 4 files changed: 211 ins; 0 del; 37 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8783.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8783/head:pull/8783

PR: https://git.openjdk.java.net/jdk/pull/8783


More information about the hotspot-compiler-dev mailing list