RFR: 8253524: C2: Refactor code that clones predicates during loop unswitching

Roland Westrelin roland at openjdk.java.net
Wed Sep 23 11:02:04 UTC 2020


During unswitching, PhaseIdealLoop::create_slow_version_of_loop()
calls PhaseIdealLoop::clone_predicates_to_unswitched_loop() twice, one
for each loops, to clone some predicates above each loop. That code is
fragile as it (implicitly) requires the fast loop to be processed
first. I propose calling
PhaseIdealLoop::clone_predicates_to_unswitched_loop() a single time
and have it handle both loops in a single pass.

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

Commit messages:
 - remove trailing whitespaces
 - cleanup suggested by Christian
 - refactoring cloning of predicates when unswitching

Changes: https://git.openjdk.java.net/jdk/pull/317/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=317&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8253524
  Stats: 113 lines in 3 files changed: 20 ins; 49 del; 44 mod
  Patch: https://git.openjdk.java.net/jdk/pull/317.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/317/head:pull/317

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


More information about the hotspot-compiler-dev mailing list