[llvm] r314182 - [AVR] Prefer BasicBlock::getIterator over Function::begin()
Dylan McKay via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 25 18:37:53 PDT 2017
Author: dylanmckay
Date: Mon Sep 25 18:37:53 2017
New Revision: 314182
URL: http://llvm.org/viewvc/llvm-project?rev=314182&view=rev
Log:
[AVR] Prefer BasicBlock::getIterator over Function::begin()
Thanks to Eli Friedman for the suggestion.
Modified:
llvm/trunk/lib/Target/AVR/AVRISelLowering.cpp
Modified: llvm/trunk/lib/Target/AVR/AVRISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/AVRISelLowering.cpp?rev=314182&r1=314181&r2=314182&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/AVRISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/AVR/AVRISelLowering.cpp Mon Sep 25 18:37:53 2017
@@ -1471,7 +1471,7 @@ MachineBasicBlock *AVRTargetLowering::in
const BasicBlock *LLVM_BB = BB->getBasicBlock();
MachineFunction::iterator I;
- for (I = F->begin(); I != F->end() && &(*I) != BB; ++I);
+ for (I = BB->getIterator(); I != F->end() && &(*I) != BB; ++I);
if (I != F->end()) ++I;
// Create loop block.
More information about the llvm-commits
mailing list