SimplifyIV comments and dead argument cleanup.
authorAndrew Trick <atrick@apple.com>
Mon, 18 May 2015 16:49:31 +0000 (16:49 +0000)
committerAndrew Trick <atrick@apple.com>
Mon, 18 May 2015 16:49:31 +0000 (16:49 +0000)
Remove crufty comments. IVUsers hasn't been used here for a long time.

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

lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Utils/SimplifyIndVar.cpp

index ab8e5b8cc025c6b20e88f228fb3c8ed7a2e98143..2ba3109354b613241e3c61381db244e2f025e809 100644 (file)
@@ -622,9 +622,8 @@ void IndVarSimplify::RewriteLoopExitValues(Loop *L, SCEVExpander &Rewriter) {
         }
       }
 
-      // If we were unable to completely replace the PHI node, clone the PHI
-      // and delete the original one. This lets IVUsers and any other maps
-      // purge the original user from their records.
+      // If we were unable to completely replace the PHI node, clone the PHI and
+      // delete the original one. This purges the original phi.
       if (!LCSSASafePhiForRAUW) {
         PHINode *NewPN = cast<PHINode>(PN->clone());
         NewPN->takeName(PN);
@@ -915,8 +914,8 @@ const SCEVAddRecExpr* WidenIV::GetExtendedOperandRecurrence(NarrowIVDefUse DU) {
   return AddRec;
 }
 
-/// GetWideRecurrence - Is this instruction potentially interesting from
-/// IVUsers' perspective after widening it's type? In other words, can the
+/// GetWideRecurrence - Is this instruction potentially interesting for further
+/// simplification after widening it's type? In other words, can the
 /// extend be safely hoisted out of the loop with SCEV reducing the value to a
 /// recurrence on the same loop. If so, return the sign or zero extended
 /// recurrence. Otherwise return NULL.
index 8bfc5fbca6fdc22e2e092ea4ab018cf9e41cd3cd..3757a801d645e7c1ca837776986270caa98100c9 100644 (file)
@@ -17,7 +17,6 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/Statistic.h"
-#include "llvm/Analysis/IVUsers.h"
 #include "llvm/Analysis/LoopInfo.h"
 #include "llvm/Analysis/LoopPass.h"
 #include "llvm/Analysis/ScalarEvolutionExpressions.h"
@@ -55,7 +54,7 @@ namespace {
 
   public:
     SimplifyIndvar(Loop *Loop, ScalarEvolution *SE, LoopInfo *LI,
-                   SmallVectorImpl<WeakVH> &Dead, IVUsers *IVU = nullptr)
+                   SmallVectorImpl<WeakVH> &Dead)
         : L(Loop), LI(LI), SE(SE), DeadInsts(Dead), Changed(false) {
       assert(LI && "IV simplification requires LoopInfo");
     }