From: Adam Nemet Date: Sun, 9 Aug 2015 20:06:08 +0000 (+0000) Subject: [LAA] Remove unused pointer partition argument from needsChecking(), NFC X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=15a7a337427ce36e5b46367fd450b0f7cd682e1b;p=oota-llvm.git [LAA] Remove unused pointer partition argument from needsChecking(), NFC This is no longer used in any of the callers. Also remove the logic of handling this argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244421 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/LoopAccessAnalysis.h b/include/llvm/Analysis/LoopAccessAnalysis.h index 44b7e97b7e2..4120263ec67 100644 --- a/include/llvm/Analysis/LoopAccessAnalysis.h +++ b/include/llvm/Analysis/LoopAccessAnalysis.h @@ -388,8 +388,8 @@ public: /// \brief Decide if we need to add a check between two groups of pointers, /// according to needsChecking. - bool needsChecking(const CheckingPtrGroup &M, const CheckingPtrGroup &N, - const SmallVectorImpl *PtrPartition) const; + bool needsChecking(const CheckingPtrGroup &M, + const CheckingPtrGroup &N) const; /// \brief Returns the number of run-time checks required according to /// needsChecking. @@ -421,12 +421,7 @@ public: /// \brief Decide whether we need to issue a run-time check for pointer at /// index \p I and \p J to prove their independence. - /// - /// If \p PtrPartition is set, it contains the partition number for - /// pointers (-1 if the pointer belongs to multiple partitions). In this - /// case omit checks between pointers belonging to the same partition. - bool needsChecking(unsigned I, unsigned J, - const SmallVectorImpl *PtrPartition = nullptr) const; + bool needsChecking(unsigned I, unsigned J) const; private: /// \brief Groups pointers such that a single memcheck is required diff --git a/lib/Analysis/LoopAccessAnalysis.cpp b/lib/Analysis/LoopAccessAnalysis.cpp index 7ebf76c6c6b..541aff5c3f4 100644 --- a/lib/Analysis/LoopAccessAnalysis.cpp +++ b/lib/Analysis/LoopAccessAnalysis.cpp @@ -171,12 +171,11 @@ void RuntimePointerChecking::generateChecks( Checks = generateChecks(); } -bool RuntimePointerChecking::needsChecking( - const CheckingPtrGroup &M, const CheckingPtrGroup &N, - const SmallVectorImpl *PtrPartition) const { +bool RuntimePointerChecking::needsChecking(const CheckingPtrGroup &M, + const CheckingPtrGroup &N) const { for (unsigned I = 0, EI = M.Members.size(); EI != I; ++I) for (unsigned J = 0, EJ = N.Members.size(); EJ != J; ++J) - if (needsChecking(M.Members[I], N.Members[J], PtrPartition)) + if (needsChecking(M.Members[I], N.Members[J])) return true; return false; } @@ -349,8 +348,7 @@ bool RuntimePointerChecking::arePointersInSamePartition( PtrToPartition[PtrIdx1] == PtrToPartition[PtrIdx2]); } -bool RuntimePointerChecking::needsChecking( - unsigned I, unsigned J, const SmallVectorImpl *PtrPartition) const { +bool RuntimePointerChecking::needsChecking(unsigned I, unsigned J) const { const PointerInfo &PointerI = Pointers[I]; const PointerInfo &PointerJ = Pointers[J]; @@ -366,10 +364,6 @@ bool RuntimePointerChecking::needsChecking( if (PointerI.AliasSetId != PointerJ.AliasSetId) return false; - // If PtrPartition is set omit checks between pointers of the same partition. - if (PtrPartition && arePointersInSamePartition(*PtrPartition, I, J)) - return false; - return true; }