RFR: 8263075: C2: simplify anti-dependence check in PhaseCFG::implicit_null_check() [v5]
Brian J. Stafford
duke at openjdk.java.net
Tue May 24 16:42:13 UTC 2022
> The reporter for this issue (https://bugs.openjdk.java.net/browse/JDK-8263075) indicated that there's an assumption that we can rely on that the while loop in question will run exactly one time. Based on this, I've done the following:
>
> - Asserted the condition that makes sure the code runs at least once
> - Asserted the condition that makes sure the code runs only once
> - Removed the `while` loop
> - Changed a couple of `break` statements into `continue` statements. They no longer need to break out of the `while` loop, now that it's gone. However, they were early exits from the `while` loop that ended up resulting in `continue` statements for the larger enclosing loop. Thus we can just call `continue` directly.
> - Removed the local variable `b`, as we no longer need to traverse the node hierarchy. We can use `mb` directly.
>
> Passes jdk, langtools, and hotspot Tier 1 tests on Linux (x64 and ARM64) and macOS (x64 and ARM64). Most Tier 1 tests pass on Windows (x64 and ARM64), but there are a handful of failures unrelated to this change.
Brian J. Stafford has updated the pull request incrementally with one additional commit since the last revision:
Added some whitespace
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/8684/files
- new: https://git.openjdk.java.net/jdk/pull/8684/files/df661be7..7abf914a
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8684&range=04
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8684&range=03-04
Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/8684.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8684/head:pull/8684
PR: https://git.openjdk.java.net/jdk/pull/8684
More information about the hotspot-compiler-dev
mailing list