[llvm] b5a1747 - [SPIRV] Move instead of copy. (#156637)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 8 05:29:34 PDT 2025
Author: Marcos Maronas
Date: 2025-09-08T14:29:30+02:00
New Revision: b5a1747c8fec1b49971d2c4e259c844a1242a7cb
URL: https://github.com/llvm/llvm-project/commit/b5a1747c8fec1b49971d2c4e259c844a1242a7cb
DIFF: https://github.com/llvm/llvm-project/commit/b5a1747c8fec1b49971d2c4e259c844a1242a7cb.diff
LOG: [SPIRV] Move instead of copy. (#156637)
Added:
Modified:
llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
index 8039cf0c432fa..b7e371d190866 100644
--- a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
@@ -124,7 +124,7 @@ getSymbolicOperandRequirements(SPIRV::OperandCategory::OperandCategory Category,
})) {
return {true,
{},
- ReqExts,
+ std::move(ReqExts),
VersionTuple(),
VersionTuple()}; // TODO: add versions to extensions.
}
diff --git a/llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp b/llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp
index 55c9c4c5380ba..1811492bf2174 100644
--- a/llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVStructurizer.cpp
@@ -43,7 +43,7 @@ using Edge = std::pair<BasicBlock *, BasicBlock *>;
static void partialOrderVisit(BasicBlock &Start,
std::function<bool(BasicBlock *)> Op) {
PartialOrderingVisitor V(*Start.getParent());
- V.partialOrderVisit(Start, Op);
+ V.partialOrderVisit(Start, std::move(Op));
}
// Returns the exact convergence region in the tree defined by `Node` for which
More information about the llvm-commits
mailing list