LRB midpath code quality
Aleksey Shipilev
shade at redhat.com
Wed Mar 6 09:44:34 UTC 2019
On 3/6/19 10:39 AM, Roman Kennke wrote:
>> We might just back-branch to the access, no? And let NPE be handled there?
>>
>> In here:
>> https://paste.fedoraproject.org/paste/nMZb19apbJq0uOB9CboUOA
>>
>> This branch:
>>
>> 0x00007f46f04b9272: test %rax,%rax
>> 0x00007f46f04b9275: je 0x00007f46f04b9294
>>
>> ...can just go to where every other branch is going:
>>
>> 0x00007f46f04b9247: movl $0x2a,0x20(%rax)
>> ; implicit exception: dispatches to 0x00007f46f04b9294
>
> The interesting question is this: we generate ideal code for
> null-check+branch before in-cset-check. What happened to this? Is it
> gone because C2 proved the value to be non-null? Why is the cloned
> branch not gone? Because it cannot be proven non-null? I believe this
> whole implicit NPE is nonsensical there: we don't want NPE or SEGV
> there, we want to branch back in case of null. I am trying a fix.
>
> It'd look like this then:
> https://paste.fedoraproject.org/paste/NHnR-sJFj8sJkESY5KS2XQ
Explicit NP check appeared :(
0x00007ff3484bb0c0: test %rax,%rax
0x00007ff3484bb0c3: je 0x00007ff3484bb105
I think we better check for NP as we do now in mid-path, but just branch to access which would
handle NPE.
-Aleksey
More information about the shenandoah-dev
mailing list