diff options
author | Kazu Hirata <kazu@google.com> | 2021-02-17 23:58:46 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-02-17 23:58:46 -0800 |
commit | 61efa3d93f733c6310abf079cd27f99868c38461 (patch) | |
tree | 7ee890edd7c783f4d1be4bb8c0cd6eee8efd7893 /llvm/lib/CodeGen/RegAllocFast.cpp | |
parent | e54579307b15ac0adfe96c5422e9cdd228ed1a76 (diff) | |
download | llvm-61efa3d93f733c6310abf079cd27f99868c38461.zip llvm-61efa3d93f733c6310abf079cd27f99868c38461.tar.gz llvm-61efa3d93f733c6310abf079cd27f99868c38461.tar.bz2 |
[CodeGen] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocFast.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocFast.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp index 6e548d4..256faa2 100644 --- a/llvm/lib/CodeGen/RegAllocFast.cpp +++ b/llvm/lib/CodeGen/RegAllocFast.cpp @@ -1253,9 +1253,8 @@ void RegAllocFast::allocateInstruction(MachineInstr &MI) { // Displace clobbered registers. const uint32_t *Mask = MO.getRegMask(); - for (LiveRegMap::iterator LRI = LiveVirtRegs.begin(), - LRIE = LiveVirtRegs.end(); LRI != LRIE; ++LRI) { - MCPhysReg PhysReg = LRI->PhysReg; + for (const LiveReg &LR : LiveVirtRegs) { + MCPhysReg PhysReg = LR.PhysReg; if (PhysReg != 0 && MachineOperand::clobbersPhysReg(Mask, PhysReg)) displacePhysReg(MI, PhysReg); } |