aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-12-24 22:45:50 -0800
committerKazu Hirata <kazu@google.com>2023-12-24 22:45:50 -0800
commit41cb686d0f05d2ed35e52f8c5e498ca3dd0809c4 (patch)
tree72f5187a7c86e0b050a95242877c10703f5c380e /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
parent966d564e43e650b9c34f9c67829d3947f52add91 (diff)
downloadllvm-41cb686d0f05d2ed35e52f8c5e498ca3dd0809c4.zip
llvm-41cb686d0f05d2ed35e52f8c5e498ca3dd0809c4.tar.gz
llvm-41cb686d0f05d2ed35e52f8c5e498ca3dd0809c4.tar.bz2
[CodeGen] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r--llvm/lib/CodeGen/TwoAddressInstructionPass.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
index bf689db..526cb84 100644
--- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -1124,8 +1124,7 @@ bool TwoAddressInstructionPass::rescheduleKillAboveMI(
}
}
- for (unsigned i = 0, e = OtherDefs.size(); i != e; ++i) {
- Register MOReg = OtherDefs[i];
+ for (Register MOReg : OtherDefs) {
if (regOverlapsSet(Uses, MOReg))
return false;
if (MOReg.isPhysical() && regOverlapsSet(LiveDefs, MOReg))