missing memory barrier in acmp with C2
Aleksey Shipilev
shade at redhat.com
Wed Oct 26 18:56:04 UTC 2016
On 10/26/2016 08:15 PM, Andrew Haley wrote:
> On 26/10/16 17:19, Aleksey Shipilev wrote:
>> I understand the sentiment, and have nothing against it.
>>
>> However, in the particular case of acmp barrier, loadload seems
>> enough, because we are indeed only ordering the loads. No potential
>> stores are of our interest here, and Hans' example talks about
>> stores. As far as I understood Hans' argument over the years, it was
>> basically about "think about what is happening around too", and we
>> don't care about that for acmp.
>
> Yes, I get that, in this particular case, it's OK. No argument. But
> the additional cost of loadload|loadstore is close to zero (and may
> actually be zero) on many architectures. Except in some extraordinary
> cases we don't need to apply such finicky reasoning. And if we do, we
> may get it wrong, and we only have to get it wrong once to suffer some
> major pain. So let's not go there.
+1
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list