Skip to content

Commit 688ae33

Browse files
committed
SimplifyIV comments and dead argument cleanup.
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
1 parent ccafe05 commit 688ae33

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

lib/Transforms/Scalar/IndVarSimplify.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,8 @@ void IndVarSimplify::RewriteLoopExitValues(Loop *L, SCEVExpander &Rewriter) {
622622
}
623623
}
624624

625-
// If we were unable to completely replace the PHI node, clone the PHI
626-
// and delete the original one. This lets IVUsers and any other maps
627-
// purge the original user from their records.
625+
// If we were unable to completely replace the PHI node, clone the PHI and
626+
// delete the original one. This purges the original phi.
628627
if (!LCSSASafePhiForRAUW) {
629628
PHINode *NewPN = cast<PHINode>(PN->clone());
630629
NewPN->takeName(PN);
@@ -915,8 +914,8 @@ const SCEVAddRecExpr* WidenIV::GetExtendedOperandRecurrence(NarrowIVDefUse DU) {
915914
return AddRec;
916915
}
917916

918-
/// GetWideRecurrence - Is this instruction potentially interesting from
919-
/// IVUsers' perspective after widening it's type? In other words, can the
917+
/// GetWideRecurrence - Is this instruction potentially interesting for further
918+
/// simplification after widening it's type? In other words, can the
920919
/// extend be safely hoisted out of the loop with SCEV reducing the value to a
921920
/// recurrence on the same loop. If so, return the sign or zero extended
922921
/// recurrence. Otherwise return NULL.

lib/Transforms/Utils/SimplifyIndVar.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "llvm/ADT/STLExtras.h"
1818
#include "llvm/ADT/SmallVector.h"
1919
#include "llvm/ADT/Statistic.h"
20-
#include "llvm/Analysis/IVUsers.h"
2120
#include "llvm/Analysis/LoopInfo.h"
2221
#include "llvm/Analysis/LoopPass.h"
2322
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
@@ -55,7 +54,7 @@ namespace {
5554

5655
public:
5756
SimplifyIndvar(Loop *Loop, ScalarEvolution *SE, LoopInfo *LI,
58-
SmallVectorImpl<WeakVH> &Dead, IVUsers *IVU = nullptr)
57+
SmallVectorImpl<WeakVH> &Dead)
5958
: L(Loop), LI(LI), SE(SE), DeadInsts(Dead), Changed(false) {
6059
assert(LI && "IV simplification requires LoopInfo");
6160
}

0 commit comments

Comments
 (0)