RFR: 8255670: Improve C2's detection of modified nodes

Vladimir Kozlov kvn at openjdk.org
Wed Sep 14 16:39:46 UTC 2022


On Wed, 14 Sep 2022 08:44:06 GMT, Emanuel Peter <epeter 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?

Okay, it make sense. I agree with changes.

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

PR: https://git.openjdk.org/jdk/pull/9439


More information about the hotspot-compiler-dev mailing list