RFR: 8343148: C2: Refactor uses of "PhaseValue::*con*() + PhaseIdealLoop::set_ctrl()" into separate method [v10]
Christian Hagedorn
chagedorn at openjdk.org
Fri Nov 15 15:09:26 UTC 2024
On Fri, 15 Nov 2024 14:30:14 GMT, theoweidmannoracle <duke at openjdk.org> wrote:
>> This patch introduces the methods `PhaseIdealLoop::intcon` and `PhaseIdealLoop::longcon` which are wrappers for:
>>
>>
>> ConINode* node = _igvn.intcon(i);
>> set_ctrl(node, C->root());
>>
>>
>> and
>>
>>
>> ConLNode* node = _igvn.longcon(i);
>> set_ctrl(node, C->root());
>>
>>
>> Occurrences of this pattern in loopnode.cpp were replaced with the appropriate call to the new methods.
>
> theoweidmannoracle has updated the pull request incrementally with one additional commit since the last revision:
>
> Replace set_root_as_ctrl with assert
Changes requested by chagedorn (Reviewer).
src/hotspot/share/opto/loopopts.cpp line 192:
> 190:
> 191: if (x->is_Con()) {
> 192: assert(get_ctrl(x) == C->root(), "constant control is not root");
I think we should still execute `continue` here because we want to skip constants. Otherwise, the updates look good!
-------------
PR Review: https://git.openjdk.org/jdk/pull/21836#pullrequestreview-2438842797
PR Review Comment: https://git.openjdk.org/jdk/pull/21836#discussion_r1843960883
More information about the hotspot-compiler-dev
mailing list