aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/RegAllocFast.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-02-17 23:58:46 -0800
committerKazu Hirata <kazu@google.com>2021-02-17 23:58:46 -0800
commit61efa3d93f733c6310abf079cd27f99868c38461 (patch)
tree7ee890edd7c783f4d1be4bb8c0cd6eee8efd7893 /llvm/lib/CodeGen/RegAllocFast.cpp
parente54579307b15ac0adfe96c5422e9cdd228ed1a76 (diff)
downloadllvm-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.cpp5
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);
}