aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorPratyay Pande <pratyay.pande@intel.com>2024-08-09 18:03:05 +0530
committerGitHub <noreply@github.com>2024-08-09 20:33:05 +0800
commit3e806c827ea367e46b835820a6c8842bafc06295 (patch)
tree3dc9bc89e8b9c8b29f497cf596c5ad1af7f6ddae /llvm/lib/CodeGen/MachineInstr.cpp
parentfc4485bf98132c99edf4a0e5612d4309de9b9393 (diff)
downloadllvm-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/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 583bc1b..0f2acdb 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -2296,9 +2296,9 @@ MachineInstrBuilder llvm::BuildMI(MachineBasicBlock &BB,
/// Compute the new DIExpression to use with a DBG_VALUE for a spill slot.
/// This prepends DW_OP_deref when spilling an indirect DBG_VALUE.
-static const DIExpression *
-computeExprForSpill(const MachineInstr &MI,
- SmallVectorImpl<const MachineOperand *> &SpilledOperands) {
+static const DIExpression *computeExprForSpill(
+ const MachineInstr &MI,
+ const SmallVectorImpl<const MachineOperand *> &SpilledOperands) {
assert(MI.getDebugVariable()->isValidLocationForIntrinsic(MI.getDebugLoc()) &&
"Expected inlined-at fields to agree");
@@ -2353,7 +2353,7 @@ MachineInstr *llvm::buildDbgValueForSpill(MachineBasicBlock &BB,
MachineInstr *llvm::buildDbgValueForSpill(
MachineBasicBlock &BB, MachineBasicBlock::iterator I,
const MachineInstr &Orig, int FrameIndex,
- SmallVectorImpl<const MachineOperand *> &SpilledOperands) {
+ const SmallVectorImpl<const MachineOperand *> &SpilledOperands) {
const DIExpression *Expr = computeExprForSpill(Orig, SpilledOperands);
MachineInstrBuilder NewMI =
BuildMI(BB, I, Orig.getDebugLoc(), Orig.getDesc());