RFR: JDK-8287061: Support for rematerializing scalar replaced objects participating in allocation merges [v5]

Cesar Soares Lucas cslucas at openjdk.org
Fri Apr 14 20:54:48 UTC 2023


On Fri, 31 Mar 2023 18:30:19 GMT, Xin Liu <xliu at openjdk.org> wrote:

>> Cesar Soares Lucas has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Address PR feeedback 1: make ObjectMergeValue subclass of ObjectValue & create new IR class to represent scalarized merges.
>
> 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.

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

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



More information about the security-dev mailing list