[llvm] r258014 - [SCEV] Use range for; NFC
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 17 10:12:45 PST 2016
Author: sanjoy
Date: Sun Jan 17 12:12:45 2016
New Revision: 258014
URL: http://llvm.org/viewvc/llvm-project?rev=258014&view=rev
Log:
[SCEV] Use range for; 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=258014&r1=258013&r2=258014&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h Sun Jan 17 12:12:45 2016
@@ -524,14 +524,10 @@ namespace llvm {
case scMulExpr:
case scSMaxExpr:
case scUMaxExpr:
- case scAddRecExpr: {
- const SCEVNAryExpr *NAry = cast<SCEVNAryExpr>(S);
- for (SCEVNAryExpr::op_iterator I = NAry->op_begin(),
- E = NAry->op_end(); I != E; ++I) {
- push(*I);
- }
+ case scAddRecExpr:
+ for (const auto *Op : cast<SCEVNAryExpr>(S)->operands())
+ push(Op);
break;
- }
case scUDivExpr: {
const SCEVUDivExpr *UDiv = cast<SCEVUDivExpr>(S);
push(UDiv->getLHS());
More information about the llvm-commits
mailing list