diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-08-14 02:46:07 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-08-14 02:46:07 +0000 |
commit | 496b7fb569990c318f7e17a3fac3ca644a215fba (patch) | |
tree | e6e0d993c6de0dc227dd54ab4a7b1fbde36171a6 /llvm | |
parent | 8b046a42f4b3b3cca9a9a0ba5db944d7ff798f0c (diff) | |
download | bcm5719-llvm-496b7fb569990c318f7e17a3fac3ca644a215fba.tar.gz bcm5719-llvm-496b7fb569990c318f7e17a3fac3ca644a215fba.zip |
[PM/AA] Run clang-format over the ScopedNoAliasAA pass prior to making
substantial changes to normalize any formatting.
llvm-svn: 245010
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Analysis/ScopedNoAliasAA.cpp | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/llvm/lib/Analysis/ScopedNoAliasAA.cpp b/llvm/lib/Analysis/ScopedNoAliasAA.cpp index e89fbfbf865..32a1e558437 100644 --- a/llvm/lib/Analysis/ScopedNoAliasAA.cpp +++ b/llvm/lib/Analysis/ScopedNoAliasAA.cpp @@ -46,8 +46,8 @@ using namespace llvm; // A handy option for disabling scoped no-alias functionality. The same effect // can also be achieved by stripping the associated metadata tags from IR, but // this option is sometimes more convenient. -static cl::opt<bool> -EnableScopedNoAlias("enable-scoped-noalias", cl::init(true)); +static cl::opt<bool> EnableScopedNoAlias("enable-scoped-noalias", + cl::init(true)); namespace { /// AliasScopeNode - This is a simple wrapper around an MDNode which provides @@ -88,7 +88,7 @@ public: /// specified pass info. void *getAdjustedAnalysisPointer(const void *PI) override { if (PI == &AliasAnalysis::ID) - return (AliasAnalysis*)this; + return (AliasAnalysis *)this; return this; } @@ -109,7 +109,7 @@ private: ModRefInfo getModRefInfo(ImmutableCallSite CS1, ImmutableCallSite CS2) override; }; -} // End of anonymous namespace +} // End of anonymous namespace // Register this pass... char ScopedNoAliasAA::ID = 0; @@ -125,24 +125,22 @@ bool ScopedNoAliasAA::doInitialization(Module &M) { return true; } -void -ScopedNoAliasAA::getAnalysisUsage(AnalysisUsage &AU) const { +void ScopedNoAliasAA::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AliasAnalysis::getAnalysisUsage(AU); } -void -ScopedNoAliasAA::collectMDInDomain(const MDNode *List, const MDNode *Domain, - SmallPtrSetImpl<const MDNode *> &Nodes) const { +void ScopedNoAliasAA::collectMDInDomain( + const MDNode *List, const MDNode *Domain, + SmallPtrSetImpl<const MDNode *> &Nodes) const { for (unsigned i = 0, ie = List->getNumOperands(); i != ie; ++i) if (const MDNode *MD = dyn_cast<MDNode>(List->getOperand(i))) if (AliasScopeNode(MD).getDomain() == Domain) Nodes.insert(MD); } -bool -ScopedNoAliasAA::mayAliasInScopes(const MDNode *Scopes, - const MDNode *NoAlias) const { +bool ScopedNoAliasAA::mayAliasInScopes(const MDNode *Scopes, + const MDNode *NoAlias) const { if (!Scopes || !NoAlias) return true; @@ -183,11 +181,9 @@ AliasResult ScopedNoAliasAA::alias(const MemoryLocation &LocA, return AliasAnalysis::alias(LocA, LocB); // Get the attached MDNodes. - const MDNode *AScopes = LocA.AATags.Scope, - *BScopes = LocB.AATags.Scope; + const MDNode *AScopes = LocA.AATags.Scope, *BScopes = LocB.AATags.Scope; - const MDNode *ANoAlias = LocA.AATags.NoAlias, - *BNoAlias = LocB.AATags.NoAlias; + const MDNode *ANoAlias = LocA.AATags.NoAlias, *BNoAlias = LocB.AATags.NoAlias; if (!mayAliasInScopes(AScopes, BNoAlias)) return NoAlias; |