[llvm] r205604 - ARM: Range based for-loop over block predecessors.
Jim Grosbach
grosbach at apple.com
Thu Apr 3 19:11:03 PDT 2014
Author: grosbach
Date: Thu Apr 3 21:11:03 2014
New Revision: 205604
URL: http://llvm.org/viewvc/llvm-project?rev=205604&view=rev
Log:
ARM: Range based for-loop over block predecessors.
No functional change.
Modified:
llvm/trunk/lib/Target/ARM/Thumb2SizeReduction.cpp
Modified: llvm/trunk/lib/Target/ARM/Thumb2SizeReduction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Thumb2SizeReduction.cpp?rev=205604&r1=205603&r2=205604&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Thumb2SizeReduction.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Thumb2SizeReduction.cpp Thu Apr 3 21:11:03 2014
@@ -921,9 +921,8 @@ bool Thumb2SizeReduce::ReduceMBB(Machine
HighLatencyCPSR = false;
// Check predecessors for the latest CPSRDef.
- for (MachineBasicBlock::pred_iterator
- I = MBB.pred_begin(), E = MBB.pred_end(); I != E; ++I) {
- const MBBInfo &PInfo = BlockInfo[(*I)->getNumber()];
+ for (auto *Pred : MBB.predecessors()) {
+ const MBBInfo &PInfo = BlockInfo[Pred->getNumber()];
if (!PInfo.Visited) {
// Since blocks are visited in RPO, this must be a back-edge.
continue;
More information about the llvm-commits
mailing list