[llvm] 818b1ab - [SCEV][NFC] Remove unused parameter from forgetLoopDispositions
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 19 00:07:33 PDT 2022
Author: Max Kazantsev
Date: 2022-09-19T14:06:42+07:00
New Revision: 818b1ab84e7be3088ade938286132cda663a6573
URL: https://github.com/llvm/llvm-project/commit/818b1ab84e7be3088ade938286132cda663a6573
DIFF: https://github.com/llvm/llvm-project/commit/818b1ab84e7be3088ade938286132cda663a6573.diff
LOG: [SCEV][NFC] Remove unused parameter from forgetLoopDispositions
Let's be honest about it, we don't drop loop dispositions for
particular loops. Remove the parameter that misleadingly makes
it apparent that we do.
Added:
Modified:
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/lib/Transforms/Scalar/LoopDeletion.cpp
llvm/lib/Transforms/Scalar/LoopSink.cpp
llvm/lib/Transforms/Utils/LoopSimplify.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h
index c258837d030cb..1de1296a63a97 100644
--- a/llvm/include/llvm/Analysis/ScalarEvolution.h
+++ b/llvm/include/llvm/Analysis/ScalarEvolution.h
@@ -937,7 +937,7 @@ class ScalarEvolution {
///
/// We don't have a way to invalidate per-loop dispositions. Clear and
/// recompute is simpler.
- void forgetLoopDispositions(const Loop *L);
+ void forgetLoopDispositions();
/// Determine the minimum number of zero bits that S is guaranteed to end in
/// (at every loop iteration). It is, at the same time, the minimum number
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index f829aaacef622..4bf975ff9e284 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -8382,9 +8382,7 @@ void ScalarEvolution::forgetValue(Value *V) {
forgetMemoizedResults(ToForget);
}
-void ScalarEvolution::forgetLoopDispositions(const Loop *L) {
- LoopDispositions.clear();
-}
+void ScalarEvolution::forgetLoopDispositions() { LoopDispositions.clear(); }
/// Get the exact loop backedge taken count considering all loop exits. A
/// computable result can only be returned for loops with all exiting blocks
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 671c01147c34b..120dd2fa2b098 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -510,7 +510,7 @@ bool LoopInvariantCodeMotion::runOnLoop(
MSSA->verifyMemorySSA();
if (Changed && SE)
- SE->forgetLoopDispositions(L);
+ SE->forgetLoopDispositions();
return Changed;
}
diff --git a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
index bf5c1f4b9a67b..1a538dda9eff4 100644
--- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp
@@ -98,7 +98,7 @@ static bool isLoopDead(Loop *L, ScalarEvolution &SE,
}
if (Changed)
- SE.forgetLoopDispositions(L);
+ SE.forgetLoopDispositions();
if (!AllEntriesInvariant || !AllOutgoingValuesSame)
return false;
diff --git a/llvm/lib/Transforms/Scalar/LoopSink.cpp b/llvm/lib/Transforms/Scalar/LoopSink.cpp
index 250eab8219db1..131af32e870db 100644
--- a/llvm/lib/Transforms/Scalar/LoopSink.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopSink.cpp
@@ -317,7 +317,7 @@ static bool sinkLoopInvariantInstructions(Loop &L, AAResults &AA, LoopInfo &LI,
}
if (Changed && SE)
- SE->forgetLoopDispositions(&L);
+ SE->forgetLoopDispositions();
return Changed;
}
diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
index 542094f09d8a5..15f9a96a2d956 100644
--- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
@@ -660,7 +660,7 @@ static bool simplifyOneLoop(Loop *L, SmallVectorImpl<Loop *> &Worklist,
// The loop disposition of all SCEV expressions that depend on any
// hoisted values have also changed.
if (SE)
- SE->forgetLoopDispositions(L);
+ SE->forgetLoopDispositions();
}
if (!AllInvariant) continue;
More information about the llvm-commits
mailing list