aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2023-04-09 20:53:45 -0700
committerCraig Topper <craig.topper@sifive.com>2023-04-10 00:03:44 -0700
commit2e6c72d3415fd67f0740e52898b5fc054eadd09b (patch)
treeb990bdfe5bea1ef8ebc697f824926a369f3810c9 /llvm/utils/TableGen/CodeGenDAGPatterns.cpp
parentd0950d05a61a116b30f45448e879924504f03b3d (diff)
downloadllvm-2e6c72d3415fd67f0740e52898b5fc054eadd09b.zip
llvm-2e6c72d3415fd67f0740e52898b5fc054eadd09b.tar.gz
llvm-2e6c72d3415fd67f0740e52898b5fc054eadd09b.tar.bz2
[TableGen] Move vectors into DAGInstruction instead of copying them. NFC
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
index 4463fe5..fd120e1 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -3938,8 +3938,8 @@ void CodeGenDAGPatterns::parseInstructionPattern(
// Create and insert the instruction.
// FIXME: InstImpResults should not be part of DAGInstruction.
Record *R = I.getRecord();
- DAGInsts.try_emplace(R, Results, Operands, InstImpResults, SrcPattern,
- ResultPattern);
+ DAGInsts.try_emplace(R, std::move(Results), std::move(Operands),
+ std::move(InstImpResults), SrcPattern, ResultPattern);
LLVM_DEBUG(I.dump());
}
@@ -3979,8 +3979,8 @@ void CodeGenDAGPatterns::ParseInstructions() {
}
// Create and insert the instruction.
- std::vector<Record*> ImpResults;
- Instructions.try_emplace(Instr, Results, Operands, ImpResults);
+ Instructions.try_emplace(Instr, std::move(Results), std::move(Operands),
+ std::vector<Record *>());
continue; // no pattern.
}