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

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 14:52:19 PST 2015


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 ;-)

The langref itself specifically talks about volatile memory accesses, and
volatile operations, and says things like:
"The optimizers *may* change the order of volatile operations relative to
non-volatile operations."
IE it goes to lengths to talk about the operations and not the locations
they refer to.



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

> reames added a comment.
>
> In http://reviews.llvm.org/D15352#305309, @majnemer wrote:
>
> > LGTM.  You have a volatile-volatile test (test25). Does it make sense to
> add a simple-volatile test, unordered-volatile or a simple-unordered test?
>
>
> simple-unordered is test22 (pre-existing)
>
> The other two are probably undefined behaviour.  Our specification is a
> bit unclear, but volatile (I believe) applies to a memory location, not an
> memory access.  Thus, mixing volatile and non-volatile access to the same
> location is likely undefined behaviour.
>
>
> http://reviews.llvm.org/D15352
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151208/33c97b33/attachment.html>


More information about the llvm-commits mailing list