OSDN Git Service

[MemorySSA] Allow reordering of loads that alias in the presence of volatile loads.
authorAlina Sbirlea <asbirlea@google.com>
Fri, 22 Dec 2017 19:54:03 +0000 (19:54 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Fri, 22 Dec 2017 19:54:03 +0000 (19:54 +0000)
commitd14c0e60145904027de6001ac169ba50a8cdf6e8
tree9af45bc05b83636e29e94fdb3d8c8ec79ee2ca74
parentecdc6849ca3bcc3d2c0dbf38f73a3b939637dd93
[MemorySSA] Allow reordering of loads that alias in the presence of volatile loads.

Summary:
Make MemorySSA allow reordering of two loads that may alias, when one is volatile.
This makes MemorySSA less conservative and behaving the same as the AliasSetTracker.
For more context, see D16875.

LLVM language reference: "The optimizers must not change the number of volatile operations or change their order of execution relative to other volatile operations. The optimizers may change the order of volatile operations relative to non-volatile operations. This is not Java’s “volatile” and has no cross-thread synchronization behavior."

Reviewers: george.burgess.iv, dberlin

Subscribers: sanjoy, reames, hfinkel, llvm-commits, Prazek

Differential Revision: https://reviews.llvm.org/D41525

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321382 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/MemorySSA.cpp
test/Analysis/MemorySSA/volatile-clobber.ll