mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[NFC] Add missing const
statements in SCEV
This commit is contained in:
parent
ee3b1b7614
commit
f74debf923
@ -696,7 +696,8 @@ public:
|
||||
/// before taking the branch. For loops with multiple exits, it may not be
|
||||
/// the number times that the loop header executes if the loop exits
|
||||
/// prematurely via another branch.
|
||||
unsigned getSmallConstantTripCount(const Loop *L, BasicBlock *ExitingBlock);
|
||||
unsigned getSmallConstantTripCount(const Loop *L,
|
||||
const BasicBlock *ExitingBlock);
|
||||
|
||||
/// Returns the upper bound of the loop trip count as a normal unsigned
|
||||
/// value.
|
||||
@ -718,8 +719,7 @@ public:
|
||||
/// for getSmallConstantTripCount, this assumes that control exits the loop
|
||||
/// via ExitingBlock.
|
||||
unsigned getSmallConstantTripMultiple(const Loop *L,
|
||||
BasicBlock *ExitingBlock);
|
||||
|
||||
const BasicBlock *ExitingBlock);
|
||||
|
||||
/// The terms "backedge taken count" and "exit count" are used
|
||||
/// interchangeably to refer to the number of times the backedge of a loop
|
||||
@ -737,8 +737,8 @@ public:
|
||||
/// For a single exit loop, this value is equivelent to the result of
|
||||
/// getBackedgeTakenCount. The loop is guaranteed to exit (via *some* exit)
|
||||
/// before the backedge is executed (ExitCount + 1) times. Note that there
|
||||
/// is no guarantee about *which* exit is taken on the exiting iteration.
|
||||
const SCEV *getExitCount(const Loop *L, BasicBlock *ExitingBlock,
|
||||
/// is no guarantee about *which* exit is taken on the exiting iteration.
|
||||
const SCEV *getExitCount(const Loop *L, const BasicBlock *ExitingBlock,
|
||||
ExitCountKind Kind = Exact);
|
||||
|
||||
/// If the specified loop has a predictable backedge-taken count, return it,
|
||||
@ -1352,13 +1352,15 @@ private:
|
||||
/// edge, or SCEVCouldNotCompute. The loop is guaranteed not to exit via
|
||||
/// this block before this number of iterations, but may exit via another
|
||||
/// block.
|
||||
const SCEV *getExact(BasicBlock *ExitingBlock, ScalarEvolution *SE) const;
|
||||
const SCEV *getExact(const BasicBlock *ExitingBlock,
|
||||
ScalarEvolution *SE) const;
|
||||
|
||||
/// Get the max backedge taken count for the loop.
|
||||
const SCEV *getMax(ScalarEvolution *SE) const;
|
||||
|
||||
/// Get the max backedge taken count for the particular loop exit.
|
||||
const SCEV *getMax(BasicBlock *ExitingBlock, ScalarEvolution *SE) const;
|
||||
const SCEV *getMax(const BasicBlock *ExitingBlock,
|
||||
ScalarEvolution *SE) const;
|
||||
|
||||
/// Return true if the number of times this backedge is taken is either the
|
||||
/// value returned by getMax or zero.
|
||||
|
@ -6392,8 +6392,9 @@ unsigned ScalarEvolution::getSmallConstantTripCount(const Loop *L) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned ScalarEvolution::getSmallConstantTripCount(const Loop *L,
|
||||
BasicBlock *ExitingBlock) {
|
||||
unsigned
|
||||
ScalarEvolution::getSmallConstantTripCount(const Loop *L,
|
||||
const BasicBlock *ExitingBlock) {
|
||||
assert(ExitingBlock && "Must pass a non-null exiting block!");
|
||||
assert(L->isLoopExiting(ExitingBlock) &&
|
||||
"Exiting block must actually branch out of the loop!");
|
||||
@ -6430,7 +6431,7 @@ unsigned ScalarEvolution::getSmallConstantTripMultiple(const Loop *L) {
|
||||
/// that control exits the loop via ExitingBlock.
|
||||
unsigned
|
||||
ScalarEvolution::getSmallConstantTripMultiple(const Loop *L,
|
||||
BasicBlock *ExitingBlock) {
|
||||
const BasicBlock *ExitingBlock) {
|
||||
assert(ExitingBlock && "Must pass a non-null exiting block!");
|
||||
assert(L->isLoopExiting(ExitingBlock) &&
|
||||
"Exiting block must actually branch out of the loop!");
|
||||
@ -6461,7 +6462,7 @@ ScalarEvolution::getSmallConstantTripMultiple(const Loop *L,
|
||||
}
|
||||
|
||||
const SCEV *ScalarEvolution::getExitCount(const Loop *L,
|
||||
BasicBlock *ExitingBlock,
|
||||
const BasicBlock *ExitingBlock,
|
||||
ExitCountKind Kind) {
|
||||
switch (Kind) {
|
||||
case Exact:
|
||||
@ -6790,7 +6791,7 @@ ScalarEvolution::BackedgeTakenInfo::getExact(const Loop *L, ScalarEvolution *SE,
|
||||
|
||||
/// Get the exact not taken count for this loop exit.
|
||||
const SCEV *
|
||||
ScalarEvolution::BackedgeTakenInfo::getExact(BasicBlock *ExitingBlock,
|
||||
ScalarEvolution::BackedgeTakenInfo::getExact(const BasicBlock *ExitingBlock,
|
||||
ScalarEvolution *SE) const {
|
||||
for (auto &ENT : ExitNotTaken)
|
||||
if (ENT.ExitingBlock == ExitingBlock && ENT.hasAlwaysTruePredicate())
|
||||
@ -6800,7 +6801,7 @@ ScalarEvolution::BackedgeTakenInfo::getExact(BasicBlock *ExitingBlock,
|
||||
}
|
||||
|
||||
const SCEV *
|
||||
ScalarEvolution::BackedgeTakenInfo::getMax(BasicBlock *ExitingBlock,
|
||||
ScalarEvolution::BackedgeTakenInfo::getMax(const BasicBlock *ExitingBlock,
|
||||
ScalarEvolution *SE) const {
|
||||
for (auto &ENT : ExitNotTaken)
|
||||
if (ENT.ExitingBlock == ExitingBlock && ENT.hasAlwaysTruePredicate())
|
||||
|
Loading…
x
Reference in New Issue
Block a user