diff options
| author | Hans Wennborg <hans@hanshq.net> | 2018-08-29 12:21:32 +0000 |
|---|---|---|
| committer | Hans Wennborg <hans@hanshq.net> | 2018-08-29 12:21:32 +0000 |
| commit | 2c390c54f64c6303aa4f7151cda5c466ae3ccc23 (patch) | |
| tree | fa9fa288532951db4818a6c0d44a23334a8d624a /llvm/lib/Analysis | |
| parent | c03b9b8854399aa5234fdee1eb3838ce4adccbaf (diff) | |
| download | bcm5719-llvm-2c390c54f64c6303aa4f7151cda5c466ae3ccc23.tar.gz bcm5719-llvm-2c390c54f64c6303aa4f7151cda5c466ae3ccc23.zip | |
Revert r340921 "[NFC] Unify guards detection"
This broke the build, see e.g.
http://lab.llvm.org:8011/builders/clang-cmake-armv8-lnt/builds/4626/
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/18647/
http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/5856/
http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/22800/
> We have multiple places in code where we try to identify whether or not
> some instruction is a guard. This patch factors out this logic into a separate
> utility function which works uniformly in all places.
>
> Differential Revision: https://reviews.llvm.org/D51152
> Reviewed By: fedor.sergeev
llvm-svn: 340923
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/AliasSetTracker.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp index fd9263fcf19..377db8a569f 100644 --- a/llvm/lib/Analysis/AliasSetTracker.cpp +++ b/llvm/lib/Analysis/AliasSetTracker.cpp @@ -34,7 +34,6 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/Transforms/Utils/GuardUtils.h" #include <cassert> #include <cstdint> #include <vector> @@ -173,7 +172,8 @@ void AliasSet::addUnknownInst(Instruction *I, AliasAnalysis &AA) { // Guards are marked as modifying memory for control flow modelling purposes, // but don't actually modify any specific memory location. using namespace PatternMatch; - bool MayWriteMemory = I->mayWriteToMemory() && !isGuard(I) && + bool MayWriteMemory = I->mayWriteToMemory() && + !match(I, m_Intrinsic<Intrinsic::experimental_guard>()) && !(I->use_empty() && match(I, m_Intrinsic<Intrinsic::invariant_start>())); if (!MayWriteMemory) { Alias = SetMayAlias; diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 527673f47d8..a207a5064db 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -66,7 +66,6 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/KnownBits.h" #include "llvm/Support/MathExtras.h" -#include "llvm/Transforms/Utils/GuardUtils.h" #include <algorithm> #include <array> #include <cassert> @@ -1903,7 +1902,8 @@ static bool isKnownNonNullFromDominatingCondition(const Value *V, BasicBlockEdge Edge(BI->getParent(), NonNullSuccessor); if (Edge.isSingleEdge() && DT->dominates(Edge, CtxI->getParent())) return true; - } else if (Pred == ICmpInst::ICMP_NE && isGuard(Curr) && + } else if (Pred == ICmpInst::ICMP_NE && + match(Curr, m_Intrinsic<Intrinsic::experimental_guard>()) && DT->dominates(cast<Instruction>(Curr), CtxI)) { return true; } |

