RFR: 8282045: When loop strip mining fails, safepoints are removed from loop anyway [v2]
Roland Westrelin
roland at openjdk.java.net
Mon Feb 28 13:20:41 UTC 2022
> I noticed that if loop strip mining fails because a safepoint is not
> found right above the exit test (following partial peel for instance),
> all safepoints are removed from the loop anyway. That's fixed by the
> change in IdealLoopTree::counted_loop() where rather than test if loop
> strip mining is enabled, the check now verifies that loop strip mining
> was successful.
>
> With that change,
> compiler/c2/irTests/TestAutoVectorization2DArray.java fails. The loop
> is not converted into a strip mined loop because there's no safepoint
> above the exit test after partial peeling. The loop strip mining logic
> is too strict when it comes to the safepoint location. Any safepoint
> that dominates the exit and is in the loop as long as there's no side
> effect between the safepoint and the exit can be used. The patch
> implements that change as well. TestAutoVectorization2DArray.java
> passes as a result.
>
> The existing requirement to have no safepoint on the backedge is too
> strict as well. If the loop has another safepoint that can be used for
> strip mining, then the safepoint on the backedge can safely be
> dropped. That's also implemented by the patch.
Roland Westrelin has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
- review
- Merge branch 'master' into JDK-8282045
- whitespaces
- fix & test
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/7513/files
- new: https://git.openjdk.java.net/jdk/pull/7513/files/73e1ad08..fa8e76d0
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7513&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7513&range=00-01
Stats: 19436 lines in 459 files changed: 13349 ins; 3058 del; 3029 mod
Patch: https://git.openjdk.java.net/jdk/pull/7513.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7513/head:pull/7513
PR: https://git.openjdk.java.net/jdk/pull/7513
More information about the hotspot-compiler-dev
mailing list