[llvm] r318952 - [SCEV] : Simplify loop to range-loop.NFC.
Javed Absar via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 24 06:35:38 PST 2017
Author: javed.absar
Date: Fri Nov 24 06:35:38 2017
New Revision: 318952
URL: http://llvm.org/viewvc/llvm-project?rev=318952&view=rev
Log:
[SCEV] : Simplify loop to range-loop.NFC.
Modified:
llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h?rev=318952&r1=318951&r2=318952&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h Fri Nov 24 06:35:38 2017
@@ -742,8 +742,8 @@ class Type;
const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) {
SmallVector<const SCEV *, 2> Operands;
- for (int i = 0, e = Expr->getNumOperands(); i < e; ++i)
- Operands.push_back(visit(Expr->getOperand(i)));
+ for (const SCEV *Op : Expr->operands())
+ Operands.push_back(visit(Op));
const Loop *L = Expr->getLoop();
const SCEV *Res = SE.getAddRecExpr(Operands, L, Expr->getNoWrapFlags());
More information about the llvm-commits
mailing list