RFR: 8366702: C2 SuperWord: refactor VTransform vector nodes
Emanuel Peter
epeter at openjdk.org
Mon Sep 8 06:04:11 UTC 2025
On Fri, 5 Sep 2025 17:37:21 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:
>> src/hotspot/share/opto/vtransform.cpp line 933:
>>
>>> 931: phase->register_new_node(vn, apply_state.vloop().cl());
>>> 932: phase->igvn()._worklist.push(vn);
>>> 933: VectorNode::trace_new_vector(vn, "AutoVectorization");
>>
>> Removing the argument here allows us yet another removal of dependency on the old scalar graph. We only needed it for using the same control as the old graph - but that is not necessary, we can just use the CountedLoop as control, which is good enough.
>
>> we can just use the CountedLoop as control, which is good enough
>
> For my understanding: this is because we can only vectorize if there are no other control dependencies in the loop?
Setting control is only for PhaseIdealLoop. It sets the internal ctrl that other loop-opts would rely on if we kept on optimizing the loop in the same PhaseIdealLoop. But if we set major progress, that means that we have messed up the graph so much that the state of PhaseIdealLoop may no longer be correct/accurate enough.
So if we set major progress, we are essencially allowed to mess up the PhaseIdealLoop state. I still have to set ctrl, but it does not matter if it is not correct ;)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27056#discussion_r2329215458
More information about the hotspot-compiler-dev
mailing list