RFR [sh/8u]: Correct order between load, LRB and membar nodes
Roman Kennke
rkennke at redhat.com
Mon Oct 28 13:34:24 UTC 2019
>>>> Webrev:
>>>> http://cr.openjdk.java.net/~rkennke/lrb-membars/webrev.00/
>>>
>>> Looks fine.
>>>
>>> *) Why do we need "ld" variable here again?
>>> 2779 Node* ld = load;
>>
>> This is so that we can push the LRBed value, but keep the non-LRB value
>> for the membar-path.
>
> Ah. It is weird to see membar not using LRB value...
Yeah. But that's more natural when you see how it's done with the GC
interface.
>>> *) Is the order w.r.t. pre_barrier okay? New patch exposes non-LRB-ed load to pre_barrier on
>>> T_OBJECT path.
>>
>> The pre-barrier is only applied on stores, the LRB only on loads.
>
> No, pre-barrier is not only for loads, see the T_OBJECT branch in the case right before new LRB
> placement. I think that's a special case for reading Reference.referent.
Right. That is a problem. Let's do something else then:
http://cr.openjdk.java.net/~rkennke/lrb-membars/webrev.01/
This extracts the original load from the LRB before feeding into the membar.
Also passes the same testing. What do you think?
Roman
More information about the shenandoah-dev
mailing list