RFR (S) 8141044: C1 should fold (this == null) to false

John Rose john.r.rose at oracle.com
Mon Nov 2 20:57:52 UTC 2015

On Nov 1, 2015, at 4:59 AM, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
> Um. I think there is a confusion between "slots" in bytecode and Locals
> in C1. My cursory reading of C1 code tells me that only the receiver and
> arguments are exposed as Local-s in C1: see the patch, where only
> GraphBuilder::state_at_entry creates Locals, and also it is said:
> // A local is a placeholder for an incoming argument to a function call.
> LEAF(Local, Instruction)
> It would seem that we track what instruction had born the value, and
> Local is a placeholder for "look, it was coming from the outside".
> Therefore, I think a subsequent astore_0/aload_0 cannot be confused as
> the receiver.

That's right, so my concern is not an issue here.

My knowledge of C1 is out of date (or just plain wrong).  I didn't notice they
have Phi functions (like C2 does) to fix these sorts of problems.

I learn something old every day!

— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20151102/7f3f050e/attachment-0001.html>

More information about the hotspot-compiler-dev mailing list