aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ModuloSchedule.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-11-26 21:21:17 -0800
committerKazu Hirata <kazu@google.com>2021-11-26 21:21:17 -0800
commit387927bbaf96310cfcbd4bc41c34b90739af8338 (patch)
tree13fe87b7640965ce931e34a25320f30cfa4def1c /llvm/lib/CodeGen/ModuloSchedule.cpp
parenta19e16352610000eae758f9aa930069540f4452f (diff)
downloadllvm-387927bbaf96310cfcbd4bc41c34b90739af8338.zip
llvm-387927bbaf96310cfcbd4bc41c34b90739af8338.tar.gz
llvm-387927bbaf96310cfcbd4bc41c34b90739af8338.tar.bz2
[Target] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
-rw-r--r--llvm/lib/CodeGen/ModuloSchedule.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ModuloSchedule.cpp b/llvm/lib/CodeGen/ModuloSchedule.cpp
index 8b3cdfa..e24bb4b 100644
--- a/llvm/lib/CodeGen/ModuloSchedule.cpp
+++ b/llvm/lib/CodeGen/ModuloSchedule.cpp
@@ -73,8 +73,7 @@ void ModuloScheduleExpander::expand() {
// stage difference for each use. Keep the maximum value.
for (MachineInstr *MI : Schedule.getInstructions()) {
int DefStage = Schedule.getStage(MI);
- for (unsigned i = 0, e = MI->getNumOperands(); i < e; ++i) {
- MachineOperand &Op = MI->getOperand(i);
+ for (const MachineOperand &Op : MI->operands()) {
if (!Op.isReg() || !Op.isDef())
continue;