RFR(S) JDK-8206140 [lworld] Move return value null checks into the callee

Ioi Lam ioi.lam at oracle.com
Wed Jul 25 14:22:14 UTC 2018

I modified the patch so that the compiled code matches what the 
interpreter does: we assumed the returned oop will not be NULL only if 
Method::is_returning_vt() is true.


Only these 4 files changed from the last webrev:

+ src/hotspot/share/opto/compile.cpp
+ src/hotspot/share/opto/doCall.cpp
+ src/hotspot/share/opto/type.cpp
+ src/hotspot/share/opto/type.hpp

With this change, I think it's no longer to fix JDK-8207219 (as it would 
enforce a behavior that's more strict than what we actually need). What 
do you think?

I'll also update the test cases for this bug and post a new webrev later 


- Ioi

On 7/13/18 5:20 AM, Tobias Hartmann wrote:
> Hi Ioi,
> thanks for making these changes!
> Your latest version of the patch looks good to me but I think we should hold off with pushing until
> we know how to fix JDK-8207219 and fully understand if value attribute consistency checking is
> strong enough to enable this optimization in all cases.
> Thanks,
> Tobias
> On 12.07.2018 21:19, Ioi Lam wrote:
>> I've simplified the runtime part of this patch after Harold pushed the "Add value types consistency
>> checks" changes.
>> http://cr.openjdk.java.net/~iklam/valhalla/8206140_lworld_null_check_in_callee.v04/
>> Now Method::is_returning_vt() is initialized during class preparation time, and the run-time checks
>> in the interpreter is kept to a minimum.
>> There's no change to the compiler part of the patch since the last webrev.
>> The test cases have been simplified since I no longer need to test for value types consistency.
>> Thanks
>> - Ioi
>> On 7/10/18 8:59 AM, Ioi Lam wrote:
>>> Oops, will do :-)
>>> Thanks
>>> - Ioi
>>> On 7/10/18 8:47 AM, Tobias Hartmann wrote:
>>>> Hi Ioi,
>>>> On 10.07.2018 17:33, Ioi Lam wrote:
>>>>> http://cr.openjdk.java.net/~iklam/valhalla/8206140_lworld_null_check_in_callee.v03/
>>>> Looks good to me but I think you need to add the copyright headers to the .jasm files (no new webrev
>>>> required).
>>>> Thanks,
>>>> Tobias

More information about the valhalla-dev mailing list