-
Enhancement
-
Resolution: Unresolved
-
P4
-
25
In `PhaseIdealLoop`, `IdealLoopTree::check_safepts` method checks if any call that is guaranteed to have a safepoint dominates the tail of the loop. In the previous implementation, `check_safepts` would stop if it found a local non-call safepoint. At this time, if there was a call before the safepoint in the dom-path, this safepoint would not be eliminated.
This patch changes the behavior of `check_safepts` to not stop when it finds a non-local safepoint. This makes simple loops with one method call ~3.8% faster (on aarch64).
```
Benchmark Mode Cnt Score Error Units
LoopSafepoint.loopVar avgt 15 208296.259 ± 1350.409 ns/op # baseline
LoopSafepoint.loopVar avgt 15 200692.874 ± 616.770 ns/op # this patch
```
Testing: tier1-2 on x86_64 and aarch64.
This patch changes the behavior of `check_safepts` to not stop when it finds a non-local safepoint. This makes simple loops with one method call ~3.8% faster (on aarch64).
```
Benchmark Mode Cnt Score Error Units
LoopSafepoint.loopVar avgt 15 208296.259 ± 1350.409 ns/op # baseline
LoopSafepoint.loopVar avgt 15 200692.874 ± 616.770 ns/op # this patch
```
Testing: tier1-2 on x86_64 and aarch64.
- links to
-
Review(master) openjdk/jdk/23057