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

Emanuel Peter epeter at openjdk.org
Tue Mar 4 10:24:53 UTC 2025


On Tue, 4 Mar 2025 10:05:03 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

> 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 :-)

Right, I agree we should unify the code.

>There is code that removes elements again from the list when calling Node::destruct() and Compile::remove_useless_node():

That's really a more complicated solution. Probably this is the best solution, which you mentioned earlier:
>While thinking about this, it would have been great to have a class LoopOpts where we can store all such things that should be live over multiple loop opts pass but which is then not used anymore. Anyway, that's definitely out of scope.

Then we can just clear the relevant arrays on start of each loop-opts phase. That way we do not have to remove individual nodes, and we can still reuse the allocated memory.

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

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


More information about the hotspot-compiler-dev mailing list