Skip to content

Commit

Permalink
[SCEV][NFC] Remove unused parameter from forgetLoopDispositions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
xortator committed Sep 19, 2022
1 parent b5137ff commit 818b1ab
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion llvm/include/llvm/Analysis/ScalarEvolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions llvm/lib/Analysis/ScalarEvolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Scalar/LICM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ bool LoopInvariantCodeMotion::runOnLoop(
MSSA->verifyMemorySSA();

if (Changed && SE)
SE->forgetLoopDispositions(L);
SE->forgetLoopDispositions();
return Changed;
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Scalar/LoopDeletion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static bool isLoopDead(Loop *L, ScalarEvolution &SE,
}

if (Changed)
SE.forgetLoopDispositions(L);
SE.forgetLoopDispositions();

if (!AllEntriesInvariant || !AllOutgoingValuesSame)
return false;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Scalar/LoopSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static bool sinkLoopInvariantInstructions(Loop &L, AAResults &AA, LoopInfo &LI,
}

if (Changed && SE)
SE->forgetLoopDispositions(&L);
SE->forgetLoopDispositions();
return Changed;
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Utils/LoopSimplify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 818b1ab

Please sign in to comment.