[llvm] [CGData][GlobalIsel][Legalizer][DAG][MC][AsmParser][X86][AMX] Use `std::move` to avoid copy (PR #118068)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 23:16:17 PST 2024


================
@@ -35,7 +35,7 @@ LegalityPredicates::typeInSet(unsigned TypeIdx,
                               std::initializer_list<LLT> TypesInit) {
   SmallVector<LLT, 4> Types = TypesInit;
   return [=](const LegalityQuery &Query) {
-    return llvm::is_contained(Types, Query.Types[TypeIdx]);
+    return llvm::is_contained(std::move(Types), Query.Types[TypeIdx]);
----------------
abhishek-kaushik22 wrote:

Sorry, I missed that. I've removed these. 

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


More information about the llvm-commits mailing list