From: Max Kazantsev Date: Mon, 19 Sep 2022 07:05:42 +0000 (+0700) Subject: [SCEV][NFC] Remove unused parameter from forgetLoopDispositions X-Git-Tag: upstream/17.0.6~33198 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=818b1ab84e7be3088ade938286132cda663a6573;p=platform%2Fupstream%2Fllvm.git [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. --- diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index c258837..1de1296 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/include/llvm/Analysis/ScalarEvolution.h @@ -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 diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index f829aaa..4bf975f 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 671c011..120dd2f 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 bf5c1f4..1a538dd 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 250eab8..131af32 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 542094f..15f9a96 100644 --- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp +++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp @@ -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;