[LoopVer] Remove unused needsRuntimeChecks(), NFC
authorAdam Nemet <anemet@apple.com>
Mon, 3 Aug 2015 23:32:57 +0000 (23:32 +0000)
committerAdam Nemet <anemet@apple.com>
Mon, 3 Aug 2015 23:32:57 +0000 (23:32 +0000)
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

include/llvm/Transforms/Utils/LoopVersioning.h
lib/Transforms/Utils/LoopVersioning.cpp

index 077ae2a11bf587c93b536f02843883148233cb09..6a3399cda5195ee01aec26c402b95b22ddb78d68 100644 (file)
@@ -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;
index e4af2e3cc95483f91441754318bb53b4194d917d..9a2ce9d6109852bee08a78d9b3a7d0b5573afb1a 100644 (file)
@@ -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;