RFR: 8343148: C2: Refactor uses of "PhaseValue::*con*() + PhaseIdealLoop::set_ctrl()" into separate method [v11]

Christian Hagedorn chagedorn at openjdk.org
Fri Nov 15 16:08:50 UTC 2024


On Fri, 15 Nov 2024 15:09:25 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:
> 
>   Add continue

Some last minor comments, otherwise the updates look good to me. Thanks for doing this extended refactoring!

src/hotspot/share/opto/loopnode.cpp line 6862:

> 6860: }
> 6861: 
> 6862: ConLNode *PhaseIdealLoop::longcon(jlong i) {

Suggestion:

ConLNode* PhaseIdealLoop::longcon(jlong i) {

src/hotspot/share/opto/loopnode.cpp line 6868:

> 6866: }
> 6867: 
> 6868: ConNode *PhaseIdealLoop::makecon(const Type* t) {

Suggestion:

ConNode* PhaseIdealLoop::makecon(const Type* t) {

src/hotspot/share/opto/loopnode.cpp line 6880:

> 6878: }
> 6879: 
> 6880: ConNode *PhaseIdealLoop::zerocon(BasicType bt) {

Suggestion:

ConNode* PhaseIdealLoop::zerocon(BasicType bt) {

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

Marked as reviewed by chagedorn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21836#pullrequestreview-2439045051
PR Review Comment: https://git.openjdk.org/jdk/pull/21836#discussion_r1844107647
PR Review Comment: https://git.openjdk.org/jdk/pull/21836#discussion_r1844107789
PR Review Comment: https://git.openjdk.org/jdk/pull/21836#discussion_r1844107950


More information about the hotspot-compiler-dev mailing list