[llvm] r205748 - ARM64: Range based for loop in ARM64PromoteConstant pass
Jim Grosbach
grosbach at apple.com
Mon Apr 7 16:47:21 PDT 2014
Author: grosbach
Date: Mon Apr 7 18:47:21 2014
New Revision: 205748
URL: http://llvm.org/viewvc/llvm-project?rev=205748&view=rev
Log:
ARM64: Range based for loop in ARM64PromoteConstant pass
Modified:
llvm/trunk/lib/Target/ARM64/ARM64PromoteConstant.cpp
Modified: llvm/trunk/lib/Target/ARM64/ARM64PromoteConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/ARM64PromoteConstant.cpp?rev=205748&r1=205747&r2=205748&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/ARM64PromoteConstant.cpp (original)
+++ llvm/trunk/lib/Target/ARM64/ARM64PromoteConstant.cpp Mon Apr 7 18:47:21 2014
@@ -350,21 +350,19 @@ bool ARM64PromoteConstant::isDominated(I
// Traverse all the existing insertion point and check if one is dominating
// NewPt
- for (InsertionPoints::iterator IPI = InsertPts.begin(),
- EndIPI = InsertPts.end();
- IPI != EndIPI; ++IPI) {
- if (NewPt == IPI->first || DT.dominates(IPI->first, NewPt) ||
- // When IPI->first is a terminator instruction, DT may think that
+ for (auto &IPI : InsertPts) {
+ if (NewPt == IPI.first || DT.dominates(IPI.first, NewPt) ||
+ // When IPI.first is a terminator instruction, DT may think that
// the result is defined on the edge.
// Here we are testing the insertion point, not the definition.
- (IPI->first->getParent() != NewPt->getParent() &&
- DT.dominates(IPI->first->getParent(), NewPt->getParent()))) {
+ (IPI.first->getParent() != NewPt->getParent() &&
+ DT.dominates(IPI.first->getParent(), NewPt->getParent()))) {
// No need to insert this point
// Record the dominated use
DEBUG(dbgs() << "Insertion point dominated by:\n");
- DEBUG(IPI->first->print(dbgs()));
+ DEBUG(IPI.first->print(dbgs()));
DEBUG(dbgs() << '\n');
- IPI->second.push_back(UseIt);
+ IPI.second.push_back(UseIt);
return true;
}
}
More information about the llvm-commits
mailing list