RFR: 8350756: C2 SuperWord Multiversioning: remove useless slow loop when the fast loop disappears [v2]

Christian Hagedorn chagedorn at openjdk.org
Tue Mar 4 10:07:53 UTC 2025


On Tue, 4 Mar 2025 09:38:34 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> I don't think that the life-time makes such a big difference, the array is quite small.

I agree with that.

> Also: would we ever remove elements from that list if it is in Compile? Or would we just keep adding things, and iterate over more and more elements, even those that are long removed from the graph?

There is code that removes elements again from the list when calling `Node::destruct()` and `Compile::remove_useless_node()`:
https://github.com/openjdk/jdk/blob/1f10ffba88119caab169b1fc43ccfd143e3b85a6/src/hotspot/share/opto/node.cpp#L612-L614
https://github.com/openjdk/jdk/blob/1f10ffba88119caab169b1fc43ccfd143e3b85a6/src/hotspot/share/opto/compile.cpp#L399-L401

> If there is no clear reason to change the code, I'd prefer to leave it as is 😅

I'm fine with both. But I think at some point we should decide to either go with one or the other solution and not have two ways of solving a similar problem :-)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23865#discussion_r1979075056


More information about the hotspot-compiler-dev mailing list