[llvm] 62ed024 - [NFC][ScalarEvolution] Clean up ExitLimit constructors.
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 20 17:41:13 PDT 2021
Author: Eli Friedman
Date: 2021-06-20T17:40:30-07:00
New Revision: 62ed024c7407c9e5d2494b684e059e89e18bc7f3
URL: https://github.com/llvm/llvm-project/commit/62ed024c7407c9e5d2494b684e059e89e18bc7f3
DIFF: https://github.com/llvm/llvm-project/commit/62ed024c7407c9e5d2494b684e059e89e18bc7f3.diff
LOG: [NFC][ScalarEvolution] Clean up ExitLimit constructors.
Make all the constructors forward to one constructor. Remove redundant
assertions.
Added:
Modified:
llvm/lib/Analysis/ScalarEvolution.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 67989c8107af5..cf57041c275bb 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -7511,10 +7511,7 @@ bool ScalarEvolution::BackedgeTakenInfo::hasOperand(const SCEV *S) const {
}
ScalarEvolution::ExitLimit::ExitLimit(const SCEV *E)
- : ExactNotTaken(E), MaxNotTaken(E) {
- assert((isa<SCEVCouldNotCompute>(MaxNotTaken) ||
- isa<SCEVConstant>(MaxNotTaken)) &&
- "No point in having a non-constant max backedge taken count!");
+ : ExitLimit(E, E, false, None) {
}
ScalarEvolution::ExitLimit::ExitLimit(
@@ -7536,17 +7533,11 @@ ScalarEvolution::ExitLimit::ExitLimit(
const SCEV *E, const SCEV *M, bool MaxOrZero,
const SmallPtrSetImpl<const SCEVPredicate *> &PredSet)
: ExitLimit(E, M, MaxOrZero, {&PredSet}) {
- assert((isa<SCEVCouldNotCompute>(MaxNotTaken) ||
- isa<SCEVConstant>(MaxNotTaken)) &&
- "No point in having a non-constant max backedge taken count!");
}
ScalarEvolution::ExitLimit::ExitLimit(const SCEV *E, const SCEV *M,
bool MaxOrZero)
: ExitLimit(E, M, MaxOrZero, None) {
- assert((isa<SCEVCouldNotCompute>(MaxNotTaken) ||
- isa<SCEVConstant>(MaxNotTaken)) &&
- "No point in having a non-constant max backedge taken count!");
}
class SCEVRecordOperands {
More information about the llvm-commits
mailing list