RFR: 8369448: C2 SuperWord: refactor VTransform to do move_unordered_reduction_out_of_loop during VTransform::optimize [v2]

Christian Hagedorn chagedorn at openjdk.org
Mon Oct 13 13:14:21 UTC 2025


On Mon, 13 Oct 2025 09:49:17 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/vtransform.cpp line 1070:
>> 
>>> 1068: //       outside the loop, and instead cheaper element-wise vector accumulations
>>> 1069: //       are performed inside the loop.
>>> 1070: bool VTransformReductionVectorNode::optimize_move_non_strict_order_reductions_out_of_loop(const VLoopAnalyzer& vloop_analyzer, VTransform& vtransform) {
>> 
>> Any particular reason you chose the additional `optimize` prefix? I think the intent is already clear without it.
>
> In my head, it is a bit like `Ideal` calling a `Ideal_....` method. I want to make clear that it is part of the `optimize`. Is that ok with you, or rather confusing?

It was a bit confusing because the latter part implies that it is an optimization. But I see that you want to have it somehow marked as "hey, I'm part of `VTransformGraph::optimize()`". But on the other hand, in IGVN, we only have `Ideal()` and then the methods we call from there often do not carry on the `ideal_` prefix. I leave it up to you to make the final call :-)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27704#discussion_r2426296217


More information about the hotspot-compiler-dev mailing list