From: Adam Nemet <anemet@apple.com>
Date: Mon, 3 Aug 2015 23:32:57 +0000 (+0000)
Subject: [LoopVer] Remove unused needsRuntimeChecks(), NFC
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f6b29bc36cd315aa3bc864890ae4bb856615fe47;p=oota-llvm.git

[LoopVer] Remove unused needsRuntimeChecks(), NFC

The previous commits moved this functionality into the client.

Also remove the now unused member variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243920 91177308-0d34-0410-b5e6-96231b3b80d8
---

diff --git a/include/llvm/Transforms/Utils/LoopVersioning.h b/include/llvm/Transforms/Utils/LoopVersioning.h
index 077ae2a11bf..6a3399cda51 100644
--- a/include/llvm/Transforms/Utils/LoopVersioning.h
+++ b/include/llvm/Transforms/Utils/LoopVersioning.h
@@ -36,10 +36,6 @@ public:
                  DominatorTree *DT,
                  const SmallVector<int, 8> *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<int, 8> *PtrToPartition;
-
   /// \brief This maps the instructions from VersionedLoop to their counterpart
   /// in NonVersionedLoop.
   ValueToValueMapTy VMap;
diff --git a/lib/Transforms/Utils/LoopVersioning.cpp b/lib/Transforms/Utils/LoopVersioning.cpp
index e4af2e3cc95..9a2ce9d6109 100644
--- a/lib/Transforms/Utils/LoopVersioning.cpp
+++ b/lib/Transforms/Utils/LoopVersioning.cpp
@@ -26,17 +26,12 @@ LoopVersioning::LoopVersioning(
     SmallVector<RuntimePointerChecking::PointerCheck, 4> Checks,
     const LoopAccessInfo &LAI, Loop *L, LoopInfo *LI, DominatorTree *DT,
     const SmallVector<int, 8> *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;