From ffa5c3a555a8d5d9931d1ae6d6c9e873ff8c5510 Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Wed, 15 Sep 2021 21:22:43 -0400 Subject: [PATCH] Fix warning on `llvm-else-after-return`. NFC. --- llvm/lib/Analysis/AliasAnalysis.cpp | 28 +++++++++++----------------- 1 file 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(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()); } -- 2.7.4