RFR: 8255670: Improve C2's detection of modified nodes
Emanuel Peter
epeter at openjdk.org
Wed Sep 14 08:47:06 UTC 2022
On Wed, 14 Sep 2022 02:42:14 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
> The only GVN transformation we do with Root node is removing TOP inputs in `RootNode::Ideal()`. That is why we are "sloppy" about putting it on worklist when we know that added input is not TOP (new Halt node in this case).
@vnkozlov right, not adding Root to the worklist was not a bug in these cases. Being "sloppy" in these cases was ok.
However, the question is how we want to handle it now. Because `modified_node` has Root recorded after the `add_req`, so we need to either add Root to the worklist, or take it off the `modified_node`.
I discussed it with @TobiHartmann , and we think that adding it to the worklist is probably the clean solution. If any node has a modification, it is possible that IGVN needs to optimize it, or at least that there could be a future changeset that adds such an optimization.
Alternatives: remove Root from `modified_node` after `add_req` (Ad-Hoc solution), or completely exclude Root from the assert.
@vnkozlov What do you think?
-------------
PR: https://git.openjdk.org/jdk/pull/9439
More information about the hotspot-compiler-dev
mailing list