Cleanup. Make ScalarEvolution an explicit argument of the
SimplifyIndVar utility since it is required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137202 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 14f995b..4cbc9d9 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -1192,7 +1192,7 @@
// Information about sign/zero extensions of CurrIV.
WideIVVisitor WIV(SE, TD);
- Changed |= simplifyUsersOfIV(CurrIV, &LPM, DeadInsts, &WIV);
+ Changed |= simplifyUsersOfIV(CurrIV, SE, &LPM, DeadInsts, &WIV);
if (WIV.WI.WidestNativeType) {
WideIVMap[CurrIV] = WIV.WI;
@@ -1831,7 +1831,7 @@
// Eliminate redundant IV users.
if (!DisableIVRewrite)
- Changed |= simplifyIVUsers(IU, &LPM, DeadInsts);
+ Changed |= simplifyIVUsers(IU, SE, &LPM, DeadInsts);
// Eliminate redundant IV cycles.
if (DisableIVRewrite)