RFR: 8374789: C2: refactor GraphKit code that create AddP nodes for raw memory to use helper method [v7]
Christian Hagedorn
chagedorn at openjdk.org
Thu Feb 19 11:24:57 UTC 2026
On Mon, 16 Feb 2026 15:33:11 GMT, Guanqiang Han <ghan at openjdk.org> wrote:
>> This PR refactors GraphKit code that creates AddP nodes for raw memory to use a dedicated helper method. This avoids passing top() explicitly at call sites and improves readability.
>>
>> Please review this change. Thanks!
>>
>> **Test:** GHA
>
> Guanqiang Han has updated the pull request incrementally with one additional commit since the last revision:
>
> Adjust code style again
You found a good trade-off for additional refactorings, thanks for the updates, looks good!
src/hotspot/share/opto/memnode.cpp line 4937:
> 4935: Compile* C = phase->C;
> 4936: addr = phase->transform(AddPNode::make_off_heap(addr,
> 4937: phase->MakeConX(offset)) );
Could probably put on the same line:
Suggestion:
addr = phase->transform(AddPNode::make_off_heap(addr, phase->MakeConX(offset)));
-------------
Marked as reviewed by chagedorn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29666#pullrequestreview-3824829408
PR Review Comment: https://git.openjdk.org/jdk/pull/29666#discussion_r2826922019
More information about the shenandoah-dev
mailing list