RFR: 8330165: C2: make superword consistently use PhaseIdealLoop::register_new_node()
Christian Hagedorn
chagedorn at openjdk.org
Fri Apr 12 12:48:42 UTC 2024
On Fri, 12 Apr 2024 12:26:10 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> Another set of changes from 8275202. There are cases in superword
> where new nodes are not assigned control. I believe they are harmless
> currently because superword is the last pass of optimizations. I also
> cleaned up the code so it always uses `register_new_node()`. There are
> a couple places where `intcon()` should be used.
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));
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18760#discussion_r1562501615
More information about the hotspot-compiler-dev
mailing list