[llvm] [RISCV][NFC] Add generateMCInstSeq in RISCVMatInt (PR #84462)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 17:26:01 PST 2024
================
@@ -436,6 +437,46 @@ InstSeq generateInstSeq(int64_t Val, const MCSubtargetInfo &STI) {
return Res;
}
+SmallVector<MCInst, 8>
+generateMCInstSeq(int64_t Val, const MCSubtargetInfo &STI, MCRegister DestReg) {
----------------
topperc wrote:
> I think SmallVectors are typically "returned" by a reference argument to avoid a copy
"named return value optimization" or "guaranteed copy elision" should avoid a copy when returning a SmallVector local variable.
https://github.com/llvm/llvm-project/pull/84462
More information about the llvm-commits
mailing list