RFR: 8322490: CastNode constructors accepts control node as input [v2]

Christian Hagedorn chagedorn at openjdk.org
Thu Dec 21 07:09:42 UTC 2023


On Thu, 21 Dec 2023 05:23:11 GMT, Joshua Cao <duke at openjdk.org> wrote:

>> It is a common pattern to have:
>> 
>> 
>> Node* n = new CastNode(...);
>> n->set_req(control_node);
>> 
>> 
>> We can modify the constructor to set the control node. It makes the code a little tidier.
>> 
>> Passes tier1 locally on my Linux machine
>
> Joshua Cao has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Convert some CastIINode instantiations to use the constructor with ctrl
>   node

src/hotspot/share/opto/compile.cpp line 4478:

> 4476:     // node from floating above the range check during loop optimizations. Otherwise, the
> 4477:     // ConvI2L node may be eliminated independently of the range check, causing the data path
> 4478:     // to become TOP while the control path is still there (although it's unreachable).

Might be cleaner to move this comment block above the creation of the cast node

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17162#discussion_r1433631487


More information about the hotspot-compiler-dev mailing list