RFR: 8254269: simplify Node::disconnect_inputs [v2]

Vladimir Kozlov kvn at openjdk.java.net
Sun Oct 11 19:47:12 UTC 2020


On Sat, 10 Oct 2020 15:12:09 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8254269: simplify Node::disconnect_inputs
>>   
>>   Optimize it for the precedence loop. because there's no null between
>>   2 non-null precedences, disconnect_inputs can break at a null value.
>
> src/hotspot/share/opto/node.cpp line 901:
> 
>> 899:
>> 900:   for( uint i = 0; i < cnt; ++i ) {
>> 901:     if( in(i) == nullptr ) continue;
> 
> Perhaps a matter of preference, but this could now be simplified to:
> if (in(i) != nullptr) {
>   set_req(i, nullptr);
> }

Agree with suggestion. It is HS code style requirements.

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

PR: https://git.openjdk.java.net/jdk/pull/589


More information about the hotspot-compiler-dev mailing list