[llvm] r272959 - AArch64: Fix range loop contradicting comment above it
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 16 14:21:49 PDT 2016
Author: arsenm
Date: Thu Jun 16 16:21:49 2016
New Revision: 272959
URL: http://llvm.org/viewvc/llvm-project?rev=272959&view=rev
Log:
AArch64: Fix range loop contradicting comment above it
Modified:
llvm/trunk/lib/Target/AArch64/AArch64BranchRelaxation.cpp
Modified: llvm/trunk/lib/Target/AArch64/AArch64BranchRelaxation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64BranchRelaxation.cpp?rev=272959&r1=272958&r2=272959&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64BranchRelaxation.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64BranchRelaxation.cpp Thu Jun 16 16:21:49 2016
@@ -463,7 +463,8 @@ bool AArch64BranchRelaxation::relaxBranc
bool Changed = false;
// Relaxing branches involves creating new basic blocks, so re-eval
// end() for termination.
- for (auto &MBB : *MF) {
+ for (MachineFunction::iterator I = MF->begin(); I != MF->end(); ++I) {
+ MachineBasicBlock &MBB = *I;
MachineInstr *MI = MBB.getFirstTerminator();
if (isConditionalBranch(MI->getOpcode()) &&
!isBlockInRange(MI, getDestBlock(MI),
More information about the llvm-commits
mailing list