RFR: 8343148: C2: Refactor uses of "PhaseValue::*con*() + PhaseIdealLoop::set_ctrl()" into separate method [v7]
Christian Hagedorn
chagedorn at openjdk.org
Mon Nov 11 11:56:17 UTC 2024
On Mon, 11 Nov 2024 10:14:50 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:
>
> Cover another case
src/hotspot/share/opto/loopTransform.cpp line 2054:
> 2052: Node *newcle = old_new[loop_end->_idx];
> 2053: _igvn.hash_delete(newcle);
> 2054: Node *one = intcon(1);
While at it, you can also fix the wrong `*` placement (should be at type):
Suggestion:
Node* one = intcon(1);
src/hotspot/share/opto/loopTransform.cpp line 2434:
> 2432: }
> 2433: if (p_offset != nullptr) {
> 2434: Node *zero = zerocon(bt);
Suggestion:
Node* zero = zerocon(bt);
src/hotspot/share/opto/loopTransform.cpp line 2485:
> 2483: if (p_offset != nullptr) {
> 2484: if (which == 1) { // must negate the extracted offset
> 2485: Node *zero = integercon(0, exp_bt);
Suggestion:
Node* zero = integercon(0, exp_bt);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21836#discussion_r1836340828
PR Review Comment: https://git.openjdk.org/jdk/pull/21836#discussion_r1836343303
PR Review Comment: https://git.openjdk.org/jdk/pull/21836#discussion_r1836344082
More information about the hotspot-compiler-dev
mailing list