[llvm] r243920 - [LoopVer] Remove unused needsRuntimeChecks(), NFC

Adam Nemet anemet at apple.com
Mon Aug 3 16:32:57 PDT 2015


Author: anemet
Date: Mon Aug  3 18:32:57 2015
New Revision: 243920

URL: http://llvm.org/viewvc/llvm-project?rev=243920&view=rev
Log:
[LoopVer] Remove unused needsRuntimeChecks(), NFC

The previous commits moved this functionality into the client.

Also remove the now unused member variable.

Modified:
    llvm/trunk/include/llvm/Transforms/Utils/LoopVersioning.h
    llvm/trunk/lib/Transforms/Utils/LoopVersioning.cpp

Modified: llvm/trunk/include/llvm/Transforms/Utils/LoopVersioning.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/LoopVersioning.h?rev=243920&r1=243919&r2=243920&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/LoopVersioning.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/LoopVersioning.h Mon Aug  3 18:32:57 2015
@@ -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;

Modified: llvm/trunk/lib/Transforms/Utils/LoopVersioning.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopVersioning.cpp?rev=243920&r1=243919&r2=243920&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopVersioning.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LoopVersioning.cpp Mon Aug  3 18:32:57 2015
@@ -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;





More information about the llvm-commits mailing list