diff options
author | Pratyay Pande <pratyay.pande@intel.com> | 2024-08-09 18:03:05 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-09 20:33:05 +0800 |
commit | 3e806c827ea367e46b835820a6c8842bafc06295 (patch) | |
tree | 3dc9bc89e8b9c8b29f497cf596c5ad1af7f6ddae /llvm/lib/CodeGen/RegAllocFast.cpp | |
parent | fc4485bf98132c99edf4a0e5612d4309de9b9393 (diff) | |
download | llvm-3e806c827ea367e46b835820a6c8842bafc06295.zip llvm-3e806c827ea367e46b835820a6c8842bafc06295.tar.gz llvm-3e806c827ea367e46b835820a6c8842bafc06295.tar.bz2 |
[NFC] Use references to avoid copying (#99863)
Modifying `auto` to `auto&` to avoid unnecessary copying
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocFast.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocFast.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp index 6e5ce72..62f7ed2 100644 --- a/llvm/lib/CodeGen/RegAllocFast.cpp +++ b/llvm/lib/CodeGen/RegAllocFast.cpp @@ -584,7 +584,7 @@ void RegAllocFastImpl::spill(MachineBasicBlock::iterator Before, SpilledOperandsMap; for (MachineOperand *MO : LRIDbgOperands) SpilledOperandsMap[MO->getParent()].push_back(MO); - for (auto MISpilledOperands : SpilledOperandsMap) { + for (const auto &MISpilledOperands : SpilledOperandsMap) { MachineInstr &DBG = *MISpilledOperands.first; // We don't have enough support for tracking operands of DBG_VALUE_LISTs. if (DBG.isDebugValueList()) |