[SCEV][NFC] Remove unused parameter from forgetLoopDispositions
authorMax Kazantsev <mkazantsev@azul.com>
Mon, 19 Sep 2022 07:05:42 +0000 (14:05 +0700)
committerMax Kazantsev <mkazantsev@azul.com>
Mon, 19 Sep 2022 07:06:42 +0000 (14:06 +0700)
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.

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

index c258837..1de1296 100644 (file)
@@ -937,7 +937,7 @@ public:
   ///
   /// 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
index f829aaa..4bf975f 100644 (file)
@@ -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
index 671c011..120dd2f 100644 (file)
@@ -510,7 +510,7 @@ bool LoopInvariantCodeMotion::runOnLoop(
     MSSA->verifyMemorySSA();
 
   if (Changed && SE)
-    SE->forgetLoopDispositions(L);
+    SE->forgetLoopDispositions();
   return Changed;
 }
 
index bf5c1f4..1a538dd 100644 (file)
@@ -98,7 +98,7 @@ static bool isLoopDead(Loop *L, ScalarEvolution &SE,
   }
 
   if (Changed)
-    SE.forgetLoopDispositions(L);
+    SE.forgetLoopDispositions();
 
   if (!AllEntriesInvariant || !AllOutgoingValuesSame)
     return false;
index 250eab8..131af32 100644 (file)
@@ -317,7 +317,7 @@ static bool sinkLoopInvariantInstructions(Loop &L, AAResults &AA, LoopInfo &LI,
   }
 
   if (Changed && SE)
-    SE->forgetLoopDispositions(&L);
+    SE->forgetLoopDispositions();
   return Changed;
 }
 
index 542094f..15f9a96 100644 (file)
@@ -660,7 +660,7 @@ ReprocessLoop:
         // 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;