[llvm] [NFC] Use references to avoid copying (PR #99863)

Pratyay Pande via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 05:04:22 PDT 2024


================
@@ -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 (auto &MISpilledOperands : SpilledOperandsMap) {
----------------
pratyay-p wrote:

@HaohaiWen Done. Modified to use const

https://github.com/llvm/llvm-project/pull/99863


More information about the llvm-commits mailing list