RFR: 8343148: C2: Refactor uses of "PhaseValue::*con*() + PhaseIdealLoop::set_ctrl()" into separate method [v4]

theoweidmannoracle duke at openjdk.org
Fri Nov 15 14:30:14 UTC 2024


On Mon, 11 Nov 2024 11:46:38 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> I opened an RFE for this https://bugs.openjdk.org/browse/JDK-8343907
>
> If you modify the following code above to use your new `makecon()` (could be done either way), could this then be turned into an assert? By looking at the code, it suggests that we only miss to set ctrl in the `singleton` case which would then be covered.
> https://github.com/openjdk/jdk/blob/5ca6698ba418e82ff93471fbb495759850f26f63/src/hotspot/share/opto/loopopts.cpp#L123-L125
> You could also only change `makecon()` above and revisit this code later again to remove the `set_root_as_ctrl()` and add an assert.

I added the asserts as @chhagedorn suggested. All tests in the internal testing passed with this new assert.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21836#discussion_r1843911132


More information about the hotspot-compiler-dev mailing list