aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/AliasAnalysis.cpp
diff options
context:
space:
mode:
authorMichael Liao <michael.hliao@gmail.com>2021-09-15 21:22:43 -0400
committerMichael Liao <michael.hliao@gmail.com>2021-09-16 11:25:43 -0400
commitffa5c3a555a8d5d9931d1ae6d6c9e873ff8c5510 (patch)
tree9a4470d1478190712569fc5cffc3d7bd65208dbb /llvm/lib/Analysis/AliasAnalysis.cpp
parent720766a50cab7a143f0aa04e3ae344769072511d (diff)
downloadllvm-ffa5c3a555a8d5d9931d1ae6d6c9e873ff8c5510.zip
llvm-ffa5c3a555a8d5d9931d1ae6d6c9e873ff8c5510.tar.gz
llvm-ffa5c3a555a8d5d9931d1ae6d6c9e873ff8c5510.tar.bz2
Fix warning on `llvm-else-after-return`. NFC.
Diffstat (limited to 'llvm/lib/Analysis/AliasAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/AliasAnalysis.cpp28
1 files changed, 11 insertions, 17 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp
index e7445e2..5ee41e3 100644
--- a/llvm/lib/Analysis/AliasAnalysis.cpp
+++ b/llvm/lib/Analysis/AliasAnalysis.cpp
@@ -200,19 +200,18 @@ ModRefInfo AAResults::getModRefInfo(Instruction *I, const CallBase *Call2,
if (const auto *Call1 = dyn_cast<CallBase>(I)) {
// Check if the two calls modify the same memory.
return getModRefInfo(Call1, Call2, AAQI);
- } else if (I->isFenceLike()) {
- // If this is a fence, just return ModRef.
- return ModRefInfo::ModRef;
- } else {
- // Otherwise, check if the call modifies or references the
- // location this memory access defines. The best we can say
- // is that if the call references what this instruction
- // defines, it must be clobbered by this location.
- const MemoryLocation DefLoc = MemoryLocation::get(I);
- ModRefInfo MR = getModRefInfo(Call2, DefLoc, AAQI);
- if (isModOrRefSet(MR))
- return setModAndRef(MR);
}
+ // If this is a fence, just return ModRef.
+ if (I->isFenceLike())
+ return ModRefInfo::ModRef;
+ // Otherwise, check if the call modifies or references the
+ // location this memory access defines. The best we can say
+ // is that if the call references what this instruction
+ // defines, it must be clobbered by this location.
+ const MemoryLocation DefLoc = MemoryLocation::get(I);
+ ModRefInfo MR = getModRefInfo(Call2, DefLoc, AAQI);
+ if (isModOrRefSet(MR))
+ return setModAndRef(MR);
return ModRefInfo::NoModRef;
}
@@ -808,11 +807,6 @@ AAResults::Concept::~Concept() = default;
// Provide a definition for the static object used to identify passes.
AnalysisKey AAManager::Key;
-namespace {
-
-
-} // end anonymous namespace
-
ExternalAAWrapperPass::ExternalAAWrapperPass() : ImmutablePass(ID) {
initializeExternalAAWrapperPassPass(*PassRegistry::getPassRegistry());
}