RFR: 8290892: C2: Intrinsify Reference.reachabilityFence [v3]

Aleksey Shipilev shade at openjdk.org
Mon May 26 11:48:55 UTC 2025


On Thu, 22 May 2025 21:23:11 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> src/hotspot/share/opto/parse1.cpp line 1225:
>> 
>>> 1223: 
>>> 1224:   if (StressReachabilityFences) {
>>> 1225:     // Keep all oop arguments alive until method return.
>> 
>> Comment says "arguments", but we save locals. Aren't arguments on "stack" in `JVMState`? For stress mode, would make sense to hook up both locals/stack from `JVMState`, maybe?
>
> It happens inside callee context, so all arguments are already moved to locals. The code could explicitly iterate over arguments (using `argument(uint)` query) or enumerate only those locals which hold arguments, but that would require a special case for receiver. Iteration over locals (`[0 ... max_locals)`) is uniform and enumerates only arguments since everything else is top.

OK!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25315#discussion_r2107156627


More information about the hotspot-compiler-dev mailing list