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

Xin Liu xliu at openjdk.org
Fri Apr 21 22:02:50 UTC 2023


On Fri, 14 Apr 2023 20:50:03 GMT, Cesar Soares Lucas <cslucas at 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



More information about the security-dev mailing list