[PATCH] D15352: [EarlyCSE] DSE of atomic unordered stores

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 15:22:50 PST 2015


On Tue, Dec 8, 2015 at 3:04 PM, Philip Reames <listmail at philipreames.com>
wrote:

> reames added a comment.
>
> In http://reviews.llvm.org/D15352#305348, @dberlin wrote:
>
> > I admit to being curious why you think volatile applies to a memory
> >  location , mainly because the last time it was discussed at length, i
> >  remember the consensus being that volatile is about the access, not the
> >  location ;-)
>
>
> So, I will freely admit I haven't given this much thought.


Nor have I ;-)


> I'm trying to not change the volatile implementation at all with these
> changes.  Having said that, let me explain...
>
> In C++, I believe volatile applies to a lvalue (i.e. location).


Let's assume this is a correct description of C++ (I think it is, but it
doesn't really matter ;P)

This is one of the places LLVM is deliberately different, AFAIK.

In fact, i believe we have tests in GVN to explicitly test that forwarding
of various mixed forms to the same location works.


>
> I'm actively trying *not* to exploit this here.  If I changed behaviour
> for volatile loads or stores, that's unintentional and should be discussed.
>
> I don't believe you have, just want to make sure we are all on the same
page.


>
> http://reviews.llvm.org/D15352
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151208/c606bcf9/attachment.html>


More information about the llvm-commits mailing list