RFR: 8330165: C2: make superword consistently use PhaseIdealLoop::register_new_node() [v2]
Roland Westrelin
roland at openjdk.org
Fri Apr 12 14:58:57 UTC 2024
On Fri, 12 Apr 2024 12:45:36 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review
>
> src/hotspot/share/opto/superword.cpp line 2557:
>
>> 2555: const TypeVect* vt = TypeVect::make(bt, vlen);
>> 2556: VectorNode* mask = new VectorMaskCmpNode(bol_test, cmp_in1, cmp_in2, bol_test_node, vt);
>> 2557: phase()->register_new_node(mask, phase()->get_ctrl(p->at(0)));
>
> Good refactoring. Since you're using this pattern quite often, I was just wondering, if we should have a separate method `register_new_node_with_ctrl_of()` (or something like that) that does:
>
> PhaseIdealLoop::register_new_node_with_ctrl_of(Node* new_node, Node* ctrl_of) {
> register_new_node(new_node, get_ctrl(ctrl_of));
> }
>
> And then:
>
> phase()->register_new_node_with_ctrl_of(mask, p->at(0));
Good idea. I updated the change.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18760#discussion_r1562670215
More information about the hotspot-compiler-dev
mailing list