aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MIRPrinter.cpp
diff options
context:
space:
mode:
authorabhishek-kaushik22 <abhishek.kaushik@intel.com>2024-11-21 16:07:56 +0800
committerGitHub <noreply@github.com>2024-11-21 13:37:56 +0530
commit46f43b6d92e49b80df13e8a537a95767ffbaac9f (patch)
treeb302b3bc1f19f60acb9f3da52cb5853da1c86301 /llvm/lib/CodeGen/MIRPrinter.cpp
parentabb9f9fa06ef22be2b0287b9047d5cfed71d91d4 (diff)
downloadllvm-46f43b6d92e49b80df13e8a537a95767ffbaac9f.zip
llvm-46f43b6d92e49b80df13e8a537a95767ffbaac9f.tar.gz
llvm-46f43b6d92e49b80df13e8a537a95767ffbaac9f.tar.bz2
[DebugInfo][InstrRef][MIR][GlobalIsel][MachineLICM] NFC Use std::move to avoid copying (#116935)
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 658bbe0..c8f6341 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -345,7 +345,7 @@ void MIRPrinter::convert(yaml::MachineFunction &YamlMF,
if (PreferredReg)
printRegMIR(PreferredReg, VReg.PreferredRegister, TRI);
printRegFlags(Reg, VReg.RegisterFlags, MF, TRI);
- YamlMF.VirtualRegisters.push_back(VReg);
+ YamlMF.VirtualRegisters.push_back(std::move(VReg));
}
// Print the live ins.
@@ -354,7 +354,7 @@ void MIRPrinter::convert(yaml::MachineFunction &YamlMF,
printRegMIR(LI.first, LiveIn.Register, TRI);
if (LI.second)
printRegMIR(LI.second, LiveIn.VirtualRegister, TRI);
- YamlMF.LiveIns.push_back(LiveIn);
+ YamlMF.LiveIns.push_back(std::move(LiveIn));
}
// Prints the callee saved registers.
@@ -364,9 +364,9 @@ void MIRPrinter::convert(yaml::MachineFunction &YamlMF,
for (const MCPhysReg *I = CalleeSavedRegs; *I; ++I) {
yaml::FlowStringValue Reg;
printRegMIR(*I, Reg, TRI);
- CalleeSavedRegisters.push_back(Reg);
+ CalleeSavedRegisters.push_back(std::move(Reg));
}
- YamlMF.CalleeSavedRegisters = CalleeSavedRegisters;
+ YamlMF.CalleeSavedRegisters = std::move(CalleeSavedRegisters);
}
}