RFR: 8281322: irTests/TestLongRangeChecks.java fails with strip mining off
Tobias Hartmann
thartmann at openjdk.java.net
Fri Feb 11 10:09:05 UTC 2022
On Mon, 7 Feb 2022 08:53:41 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> Some of the long range check transformations take advantage of the
> safepoint captured by loop strip mining to extract jvm state (in order
> to add back empty predicates to the inner loop of a loop nest). As a
> consequence, irTests/TestLongRangeChecks.java fails with strip mining
> off and users might experience performance anomalies where changing
> GCs affect purely computational code.
>
> The strip mined loop nest creation is a 2 step process:
>
> 1- when a CountedLoop is created, an OuterStripMinedLoop is also added
> but it's not fully constructed
>
> 2- at macro expansion time, the OuterStripMinedLoop is turned into an
> actual loop by adding Phis and a proper exit condition
>
> I propose always doing 1- whether loop strip mining is enabled or
> not. This causes the safepoint to always be captured. Loop strip ming
> is not expected to get in the way of loop transformations so this
> change in itself should be performance neutral. Then at 2-, if loop
> strip mining is not enabled, the OuterStripMinedLoop can be removed
> and the safepoint moved back into the loop in case
> LoopStripMiningIter=1 or simply removed too.
For the record: Christian's testing found issues (he reported them to Roland already).
I think it would be good to change the bug title to something more descriptive.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7364
More information about the hotspot-compiler-dev
mailing list