[llvm] r278651 - [ScopedNoAliasAA] collectMDInDomain should be a free function

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 14 20:56:06 PDT 2016


Author: majnemer
Date: Sun Aug 14 22:56:06 2016
New Revision: 278651

URL: http://llvm.org/viewvc/llvm-project?rev=278651&view=rev
Log:
[ScopedNoAliasAA] collectMDInDomain should be a free function

collectMDInDomain doesn't use any class members, making it a free
function is not a functional change.

Modified:
    llvm/trunk/include/llvm/Analysis/ScopedNoAliasAA.h
    llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp

Modified: llvm/trunk/include/llvm/Analysis/ScopedNoAliasAA.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScopedNoAliasAA.h?rev=278651&r1=278650&r2=278651&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScopedNoAliasAA.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScopedNoAliasAA.h Sun Aug 14 22:56:06 2016
@@ -42,8 +42,6 @@ public:
 
 private:
   bool mayAliasInScopes(const MDNode *Scopes, const MDNode *NoAlias) const;
-  void collectMDInDomain(const MDNode *List, const MDNode *Domain,
-                         SmallPtrSetImpl<const MDNode *> &Nodes) const;
 };
 
 /// Analysis pass providing a never-invalidated alias analysis result.

Modified: llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp?rev=278651&r1=278650&r2=278651&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp (original)
+++ llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp Sun Aug 14 22:56:06 2016
@@ -127,9 +127,8 @@ ModRefInfo ScopedNoAliasAAResult::getMod
   return AAResultBase::getModRefInfo(CS1, CS2);
 }
 
-void ScopedNoAliasAAResult::collectMDInDomain(
-    const MDNode *List, const MDNode *Domain,
-    SmallPtrSetImpl<const MDNode *> &Nodes) const {
+static void collectMDInDomain(const MDNode *List, const MDNode *Domain,
+                              SmallPtrSetImpl<const MDNode *> &Nodes) {
   for (const MDOperand &MDOp : List->operands())
     if (const MDNode *MD = dyn_cast<MDNode>(MDOp))
       if (AliasScopeNode(MD).getDomain() == Domain)




More information about the llvm-commits mailing list