mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-04 01:26:41 +00:00
[SCEV] Get rid of an unnecessary lambda; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251099 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cc40d6fad3
commit
ebf9b86297
@ -1378,19 +1378,17 @@ bool ScalarEvolution::proveNoWrapByVaryingStart(const SCEV *Start,
|
||||
for (unsigned Delta : {-2, -1, 1, 2}) {
|
||||
const SCEV *PreStart = getConstant(StartAI - Delta);
|
||||
|
||||
FoldingSetNodeID ID;
|
||||
ID.AddInteger(scAddRecExpr);
|
||||
ID.AddPointer(PreStart);
|
||||
ID.AddPointer(Step);
|
||||
ID.AddPointer(L);
|
||||
void *IP = nullptr;
|
||||
const auto *PreAR =
|
||||
static_cast<SCEVAddRecExpr *>(UniqueSCEVs.FindNodeOrInsertPos(ID, IP));
|
||||
|
||||
// Give up if we don't already have the add recurrence we need because
|
||||
// actually constructing an add recurrence is relatively expensive.
|
||||
const SCEVAddRecExpr *PreAR = [&]() {
|
||||
FoldingSetNodeID ID;
|
||||
ID.AddInteger(scAddRecExpr);
|
||||
ID.AddPointer(PreStart);
|
||||
ID.AddPointer(Step);
|
||||
ID.AddPointer(L);
|
||||
void *IP = nullptr;
|
||||
return static_cast<SCEVAddRecExpr *>(
|
||||
this->UniqueSCEVs.FindNodeOrInsertPos(ID, IP));
|
||||
}();
|
||||
|
||||
if (PreAR && PreAR->getNoWrapFlags(WrapType)) { // proves (2)
|
||||
const SCEV *DeltaS = getConstant(StartC->getType(), Delta);
|
||||
ICmpInst::Predicate Pred = ICmpInst::BAD_ICMP_PREDICATE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user