diff options
author | Philip Reames <listmail@philipreames.com> | 2016-05-06 18:46:45 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2016-05-06 18:46:45 +0000 |
commit | 1fdce639d2b2a0279a6dc740f55241388330c1b9 (patch) | |
tree | 6baa937ef1659927bff389cc9e5d24178979c2b5 /llvm/lib/Transforms | |
parent | c45c960006bc23923879c15cd314d819c5da00d0 (diff) | |
download | bcm5719-llvm-1fdce639d2b2a0279a6dc740f55241388330c1b9.tar.gz bcm5719-llvm-1fdce639d2b2a0279a6dc740f55241388330c1b9.zip |
[GVN] Handle unordered atomics in cross block FRE
You'll note there are essentially no code changes here. Cross block FRE heavily reuses code from the block local FRE. All of the tricky parts were done as part of the previous patch and the refactoring that removed the original code duplication.
llvm-svn: 268775
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/GVN.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index 116dc69b372..7e937bf954a 100644 --- a/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/llvm/lib/Transforms/Scalar/GVN.cpp @@ -1598,11 +1598,6 @@ bool GVN::processNonLocalLoad(LoadInst *LI) { if (LI->getParent()->getParent()->hasFnAttribute(Attribute::SanitizeAddress)) return false; - // This code hasn't been audited for atomic, ordered, or volatile memory - // access. - if (!LI->isSimple()) - return false; - // Step 1: Find the non-local dependencies of the load. LoadDepVect Deps; MD->getNonLocalPointerDependency(LI, Deps); @@ -1669,6 +1664,11 @@ bool GVN::processNonLocalLoad(LoadInst *LI) { return true; } + // This code hasn't been audited for atomic, ordered, or volatile memory + // access. + if (!LI->isSimple()) + return false; + // Step 4: Eliminate partial redundancy. if (!EnablePRE || !EnableLoadPRE) return false; |