[llvm] r286429 - [SCEV] Eta reduce some lambdas; NFC
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 9 22:33:55 PST 2016
Author: sanjoy
Date: Thu Nov 10 00:33:54 2016
New Revision: 286429
URL: http://llvm.org/viewvc/llvm-project?rev=286429&view=rev
Log:
[SCEV] Eta reduce some lambdas; NFC
Modified:
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=286429&r1=286428&r2=286429&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Thu Nov 10 00:33:54 2016
@@ -3370,8 +3370,7 @@ bool ScalarEvolution::containsAddRecurre
if (I != HasRecMap.end())
return I->second;
- bool FoundAddRec =
- SCEVExprContains(S, [](const SCEV *S) { return isa<SCEVAddRecExpr>(S); });
+ bool FoundAddRec = SCEVExprContains(S, isa<SCEVAddRecExpr, const SCEV *>);
HasRecMap.insert({S, FoundAddRec});
return FoundAddRec;
}
@@ -9153,7 +9152,7 @@ static bool findArrayDimensionsRec(Scala
// Returns true when one of the SCEVs of Terms contains a SCEVUnknown parameter.
static inline bool containsParameters(SmallVectorImpl<const SCEV *> &Terms) {
for (const SCEV *T : Terms)
- if (SCEVExprContains(T, [](const SCEV *S) { return isa<SCEVUnknown>(S); }))
+ if (SCEVExprContains(T, isa<SCEVUnknown, const SCEV *>))
return true;
return false;
}
More information about the llvm-commits
mailing list