RFR: 8274130: C2: MulNode::Ideal chained transformations may act on wrong nodes [v2]
Aleksey Shipilev
shade at openjdk.java.net
Mon Sep 27 08:58:26 UTC 2021
> I was puzzled by it when fixing JDK-8274060. It looks that new optimizations added by [JDK-8273454](https://bugs.openjdk.java.net/browse/JDK-8273454) and [JDK-8263006](https://bugs.openjdk.java.net/browse/JDK-8263006) rewire `in(1)` and `in(2)` in `MulNode::Ideal`, which means the chained transformations should see them? Yet, both inputs and their `Type`-s are cached locally and not refreshed. I have not seen failures due to this yet, but it looks that the current code is subtly incorrect because of this.
>
> I thought about doing `return this` instead of `progress = true`, so that we leave `MulNode::Ideal` once we hit any transform and hope to return back, but I wondered if that would expose us to different graph shapes in-between successive `MulNode::Ideal` calls, which might have other unintended consequences. Therefore, I opted to a more conservative patch.
>
> Additional testing:
> - [x] `compiler/` tests
> - [x] `tier1` tests
> - [x] 100K Fuzzer tests (one unrelated failure)
Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
Align the stars manually
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/5631/files
- new: https://git.openjdk.java.net/jdk/pull/5631/files/932f039a..c8d3cb12
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5631&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5631&range=00-01
Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod
Patch: https://git.openjdk.java.net/jdk/pull/5631.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5631/head:pull/5631
PR: https://git.openjdk.java.net/jdk/pull/5631
More information about the hotspot-compiler-dev
mailing list