LRB midpath code quality
Aleksey Shipilev
shade at redhat.com
Wed Mar 6 09:35:59 UTC 2019
On 3/6/19 10:34 AM, Roman Kennke wrote:
>>>> Well yes, an implicit null-check would be good. It would never fire,
>>>> because if the value is null, it would blow up earlier in the cset
>>>> check. Or am I missing something?
>>>
>>> I suppose PhaseCFG::implicit_null_check() doesn't recognize the barrier
>>> load as a candidate for implicit null checks for some reason.
>>
>> Yes, maybe.
>>
>> But can you explain to me why it should be needed at all? If a
>> dominating (implicit?) null-check before the in-cset-check should catch
>> all nulls on that path already? Why does it matter?
>
> Also, I don't think we want to generate an NPE/SEGV on that path. We
> want to skip a bunch of stuff if the value is NULL.
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
-Aleksey
More information about the shenandoah-dev
mailing list