On Fri, 14 Apr 2023 20:50:03 GMT, Cesar Soares Lucas <cslu...@openjdk.org> 
wrote:

>> src/hotspot/share/opto/escape.cpp line 457:
>> 
>>> 455:         found_sr_allocate = true;
>>> 456:       } else {
>>> 457:         ptn->set_scalar_replaceable(false);
>> 
>> This member function is const. Do we really need to change ptn's property 
>> here? 
>> 
>> My reading is ophi is profitable as long as we spot any input object which 
>> can be eliminated.  how about you just return at line 455?
>
> This is actually necessary here. By setting the input to NSR I don't need to 
> later, when performing reduction, check that I can eliminate the node. I can 
> just check that I can scalar replace the input. If I removed this line I'd 
> hit a problem if the merge had an input that is SR but that ME can't 
> eliminate.

okay. I see you mean.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/12897#discussion_r1174188560

Reply via email to