RFR 8219154 [lworld] C1 aastore of flattened array needs null check for L-types

Ioi Lam ioi.lam at oracle.com
Sun Feb 17 01:37:51 UTC 2019


https://bugs.openjdk.java.net/browse/JDK-8219154
http://cr.openjdk.java.net/~iklam/valhalla/8219154-aastore-null-check-for-l-type.v01/

I added a new method Instruction::is_never_null(), and set it whenever 
we have add a new object value into the IR

   - Local
   - NewValueTypeInstance
     This covers aaload, getfield, withfield, newobject.
   - Invoke
   - CheckCast

Note that I haven't handled getstatic yet. The default behavior is to 
emit the null check, so it will be safe, just slower. I will fix that as 
part of JDK-8219155.

I added ciObjectFactory::make_never_null_wrapper, so that the ident will 
be set properly. Otherwise printing ciWrappers inside gdb would cause an 
assert.

Also, I have a question of the lifetime of the ciWrappers allocated 
inside the original ciSignature::ciSignature code. Will these get freed 
when the current compilation finishes, or will they stick forever until 
the current compiler thread is terminated? If it's the latter, then 
maybe we should cache them in ciType::_never_null_wrapper?

Thanks

- Ioi




More information about the valhalla-dev mailing list