[llvm] r318401 - [SCEV] simplify loop. NFC.
Javed Absar via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 05:49:27 PST 2017
Author: javed.absar
Date: Thu Nov 16 05:49:27 2017
New Revision: 318401
URL: http://llvm.org/viewvc/llvm-project?rev=318401&view=rev
Log:
[SCEV] simplify loop. NFC.
Change loop to range-based
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=318401&r1=318400&r2=318401&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Thu Nov 16 05:49:27 2017
@@ -2656,8 +2656,8 @@ ScalarEvolution::getOrCreateAddExpr(Smal
SCEV::NoWrapFlags Flags) {
FoldingSetNodeID ID;
ID.AddInteger(scAddExpr);
- for (unsigned i = 0, e = Ops.size(); i != e; ++i)
- ID.AddPointer(Ops[i]);
+ for (const SCEV *Op : Ops)
+ ID.AddPointer(Op);
void *IP = nullptr;
SCEVAddExpr *S =
static_cast<SCEVAddExpr *>(UniqueSCEVs.FindNodeOrInsertPos(ID, IP));
More information about the llvm-commits
mailing list