RFR: 8346777: Remove unneeded ReplaceInitAndStrideStrategy and add missing const declarations

Christian Hagedorn chagedorn at openjdk.org
Tue Feb 4 09:49:03 UTC 2025


This patch's main goal is to remove the unneeded `ReplaceInitAndStrideStrategy`. We can use the existing `ReplaceInitAndCloneStrideStrategy` instead. The reason behind is that when splitting a loop as part of a loop optimization, we are always keeping the stride the same (i.e. can use `ReplaceInitAndCloneStrideStrategy`) except for when unrolling a loop. In that case, we keep the init value and update the stride instead. This is done with `UpdateStrideForAssertionPredicates`. `ReplaceInitAndCloneStrideStrategy` was used as an intermediate step while applying more refactorings. It's now time to abandon it.

I also cover other mostly minor things with this change:
- Adding missing `const` declarations.
- Renaming `ctrl` -> `control`
- Swapping order of parameters

Thanks,
Christian

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

Commit messages:
 - 8346777: Remove unneeded ReplaceInitAndStrideStrategy and add missing const declarations

Changes: https://git.openjdk.org/jdk/pull/23434/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23434&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8346777
  Stats: 106 lines in 2 files changed: 1 ins; 37 del; 68 mod
  Patch: https://git.openjdk.org/jdk/pull/23434.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23434/head:pull/23434

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


More information about the hotspot-compiler-dev mailing list