[llvm] 053c0ad - [Mips] Use a range-based for loop (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 29 18:46:26 PST 2024
Author: Kazu Hirata
Date: 2024-01-29T18:46:14-08:00
New Revision: 053c0ad49985ce3fe117df72617dd5a77d9e389f
URL: https://github.com/llvm/llvm-project/commit/053c0ad49985ce3fe117df72617dd5a77d9e389f
DIFF: https://github.com/llvm/llvm-project/commit/053c0ad49985ce3fe117df72617dd5a77d9e389f.diff
LOG: [Mips] Use a range-based for loop (NFC)
Added:
Modified:
llvm/lib/Target/Mips/MipsBranchExpansion.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Mips/MipsBranchExpansion.cpp b/llvm/lib/Target/Mips/MipsBranchExpansion.cpp
index a4fa0792a998d..721e525331c6c 100644
--- a/llvm/lib/Target/Mips/MipsBranchExpansion.cpp
+++ b/llvm/lib/Target/Mips/MipsBranchExpansion.cpp
@@ -299,9 +299,8 @@ void MipsBranchExpansion::initMBBInfo() {
MachineBasicBlock *MBB = MFp->getBlockNumbered(I);
// Compute size of MBB.
- for (MachineBasicBlock::instr_iterator MI = MBB->instr_begin();
- MI != MBB->instr_end(); ++MI)
- MBBInfos[I].Size += TII->getInstSizeInBytes(*MI);
+ for (MachineInstr &MI : MBB->instrs())
+ MBBInfos[I].Size += TII->getInstSizeInBytes(MI);
}
}
More information about the llvm-commits
mailing list