From 6b6082dc42ea1fad323683c7496ee179d6312cab Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Mon, 3 Aug 2015 23:32:57 +0000 Subject: [PATCH] [LoopVer] Remove unused needsRuntimeChecks(), NFC The previous commits moved this functionality into the client. Also remove the now unused member variable. llvm-svn: 243920 --- llvm/include/llvm/Transforms/Utils/LoopVersioning.h | 11 ----------- llvm/lib/Transforms/Utils/LoopVersioning.cpp | 9 ++------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/llvm/include/llvm/Transforms/Utils/LoopVersioning.h b/llvm/include/llvm/Transforms/Utils/LoopVersioning.h index 077ae2a..6a3399c 100644 --- a/llvm/include/llvm/Transforms/Utils/LoopVersioning.h +++ b/llvm/include/llvm/Transforms/Utils/LoopVersioning.h @@ -36,10 +36,6 @@ public: DominatorTree *DT, const SmallVector *PtrToPartition = nullptr); - /// \brief Returns true if we need memchecks to disambiguate may-aliasing - /// accesses. - bool needsRuntimeChecks() const; - /// \brief Performs the CFG manipulation part of versioning the loop including /// the DominatorTree and LoopInfo updates. /// @@ -80,13 +76,6 @@ private: /// loop may alias (memchecks failed). Loop *NonVersionedLoop; - /// \brief For each memory pointer it contains the partitionId it is used in. - /// If nullptr, no partitioning is used. - /// - /// The I-th entry corresponds to I-th entry in LAI.getRuntimePointerCheck(). - /// If the pointer is used in multiple partitions the entry is set to -1. - const SmallVector *PtrToPartition; - /// \brief This maps the instructions from VersionedLoop to their counterpart /// in NonVersionedLoop. ValueToValueMapTy VMap; diff --git a/llvm/lib/Transforms/Utils/LoopVersioning.cpp b/llvm/lib/Transforms/Utils/LoopVersioning.cpp index e4af2e3..9a2ce9d 100644 --- a/llvm/lib/Transforms/Utils/LoopVersioning.cpp +++ b/llvm/lib/Transforms/Utils/LoopVersioning.cpp @@ -26,17 +26,12 @@ LoopVersioning::LoopVersioning( SmallVector Checks, const LoopAccessInfo &LAI, Loop *L, LoopInfo *LI, DominatorTree *DT, const SmallVector *PtrToPartition) - : VersionedLoop(L), NonVersionedLoop(nullptr), - PtrToPartition(PtrToPartition), Checks(std::move(Checks)), LAI(LAI), - LI(LI), DT(DT) { + : VersionedLoop(L), NonVersionedLoop(nullptr), Checks(std::move(Checks)), + LAI(LAI), LI(LI), DT(DT) { assert(L->getExitBlock() && "No single exit block"); assert(L->getLoopPreheader() && "No preheader"); } -bool LoopVersioning::needsRuntimeChecks() const { - return LAI.getRuntimePointerChecking()->needsAnyChecking(PtrToPartition); -} - void LoopVersioning::versionLoop(Pass *P) { Instruction *FirstCheckInst; Instruction *MemRuntimeCheck; -- 2.7.4