Move some code into ScalarEvolution.cpp; NFC
I need to add some asserts to these constructors that are easier to add once they're in the .cpp file. llvm-svn: 303032
This commit is contained in:
parent
1d4a0f270c
commit
f6f6fb903e
|
@ -568,27 +568,16 @@ private:
|
||||||
Predicates.insert(P);
|
Predicates.insert(P);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*implicit*/ ExitLimit(const SCEV *E)
|
/*implicit*/ ExitLimit(const SCEV *E);
|
||||||
: ExactNotTaken(E), MaxNotTaken(E), MaxOrZero(false) {}
|
|
||||||
|
|
||||||
ExitLimit(
|
ExitLimit(
|
||||||
const SCEV *E, const SCEV *M, bool MaxOrZero,
|
const SCEV *E, const SCEV *M, bool MaxOrZero,
|
||||||
ArrayRef<const SmallPtrSetImpl<const SCEVPredicate *> *> PredSetList)
|
ArrayRef<const SmallPtrSetImpl<const SCEVPredicate *> *> PredSetList);
|
||||||
: ExactNotTaken(E), MaxNotTaken(M), MaxOrZero(MaxOrZero) {
|
|
||||||
assert((isa<SCEVCouldNotCompute>(ExactNotTaken) ||
|
|
||||||
!isa<SCEVCouldNotCompute>(MaxNotTaken)) &&
|
|
||||||
"Exact is not allowed to be less precise than Max");
|
|
||||||
for (auto *PredSet : PredSetList)
|
|
||||||
for (auto *P : *PredSet)
|
|
||||||
addPredicate(P);
|
|
||||||
}
|
|
||||||
|
|
||||||
ExitLimit(const SCEV *E, const SCEV *M, bool MaxOrZero,
|
ExitLimit(const SCEV *E, const SCEV *M, bool MaxOrZero,
|
||||||
const SmallPtrSetImpl<const SCEVPredicate *> &PredSet)
|
const SmallPtrSetImpl<const SCEVPredicate *> &PredSet);
|
||||||
: ExitLimit(E, M, MaxOrZero, {&PredSet}) {}
|
|
||||||
|
|
||||||
ExitLimit(const SCEV *E, const SCEV *M, bool MaxOrZero)
|
ExitLimit(const SCEV *E, const SCEV *M, bool MaxOrZero);
|
||||||
: ExitLimit(E, M, MaxOrZero, None) {}
|
|
||||||
|
|
||||||
/// Test whether this ExitLimit contains any computed information, or
|
/// Test whether this ExitLimit contains any computed information, or
|
||||||
/// whether it's all SCEVCouldNotCompute values.
|
/// whether it's all SCEVCouldNotCompute values.
|
||||||
|
|
|
@ -5955,6 +5955,30 @@ bool ScalarEvolution::BackedgeTakenInfo::hasOperand(const SCEV *S,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScalarEvolution::ExitLimit::ExitLimit(const SCEV *E)
|
||||||
|
: ExactNotTaken(E), MaxNotTaken(E), MaxOrZero(false) {}
|
||||||
|
|
||||||
|
ScalarEvolution::ExitLimit::ExitLimit(
|
||||||
|
const SCEV *E, const SCEV *M, bool MaxOrZero,
|
||||||
|
ArrayRef<const SmallPtrSetImpl<const SCEVPredicate *> *> PredSetList)
|
||||||
|
: ExactNotTaken(E), MaxNotTaken(M), MaxOrZero(MaxOrZero) {
|
||||||
|
assert((isa<SCEVCouldNotCompute>(ExactNotTaken) ||
|
||||||
|
!isa<SCEVCouldNotCompute>(MaxNotTaken)) &&
|
||||||
|
"Exact is not allowed to be less precise than Max");
|
||||||
|
for (auto *PredSet : PredSetList)
|
||||||
|
for (auto *P : *PredSet)
|
||||||
|
addPredicate(P);
|
||||||
|
}
|
||||||
|
|
||||||
|
ScalarEvolution::ExitLimit::ExitLimit(
|
||||||
|
const SCEV *E, const SCEV *M, bool MaxOrZero,
|
||||||
|
const SmallPtrSetImpl<const SCEVPredicate *> &PredSet)
|
||||||
|
: ExitLimit(E, M, MaxOrZero, {&PredSet}) {}
|
||||||
|
|
||||||
|
ScalarEvolution::ExitLimit::ExitLimit(const SCEV *E, const SCEV *M,
|
||||||
|
bool MaxOrZero)
|
||||||
|
: ExitLimit(E, M, MaxOrZero, None) {}
|
||||||
|
|
||||||
/// Allocate memory for BackedgeTakenInfo and copy the not-taken count of each
|
/// Allocate memory for BackedgeTakenInfo and copy the not-taken count of each
|
||||||
/// computable exit into a persistent ExitNotTakenInfo array.
|
/// computable exit into a persistent ExitNotTakenInfo array.
|
||||||
ScalarEvolution::BackedgeTakenInfo::BackedgeTakenInfo(
|
ScalarEvolution::BackedgeTakenInfo::BackedgeTakenInfo(
|
||||||
|
|
Loading…
Reference in New Issue