mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-22 11:40:05 +00:00
spirv-reduce: Remove redundant r-value references (#4232)
This commit is contained in:
parent
212895d4c2
commit
8da800c4cb
@ -54,10 +54,10 @@ void Reducer::SetInterestingnessFunction(
|
||||
}
|
||||
|
||||
Reducer::ReductionResultStatus Reducer::Run(
|
||||
std::vector<uint32_t>&& binary_in, std::vector<uint32_t>* binary_out,
|
||||
const std::vector<uint32_t>& binary_in, std::vector<uint32_t>* binary_out,
|
||||
spv_const_reducer_options options,
|
||||
spv_validator_options validator_options) {
|
||||
std::vector<uint32_t> current_binary(std::move(binary_in));
|
||||
std::vector<uint32_t> current_binary(binary_in);
|
||||
|
||||
spvtools::SpirvTools tools(target_env_);
|
||||
assert(tools.IsValid() && "Failed to create SPIRV-Tools interface");
|
||||
@ -138,13 +138,13 @@ void Reducer::AddDefaultReductionPasses() {
|
||||
}
|
||||
|
||||
void Reducer::AddReductionPass(
|
||||
std::unique_ptr<ReductionOpportunityFinder>&& finder) {
|
||||
std::unique_ptr<ReductionOpportunityFinder> finder) {
|
||||
passes_.push_back(
|
||||
spvtools::MakeUnique<ReductionPass>(target_env_, std::move(finder)));
|
||||
}
|
||||
}
|
||||
|
||||
void Reducer::AddCleanupReductionPass(
|
||||
std::unique_ptr<ReductionOpportunityFinder>&& finder) {
|
||||
std::unique_ptr<ReductionOpportunityFinder> finder) {
|
||||
cleanup_passes_.push_back(
|
||||
spvtools::MakeUnique<ReductionPass>(target_env_, std::move(finder)));
|
||||
}
|
||||
|
@ -84,17 +84,17 @@ class Reducer {
|
||||
|
||||
// Adds a reduction pass based on the given finder to the sequence of passes
|
||||
// that will be iterated over.
|
||||
void AddReductionPass(std::unique_ptr<ReductionOpportunityFinder>&& finder);
|
||||
void AddReductionPass(std::unique_ptr<ReductionOpportunityFinder> finder);
|
||||
|
||||
// Adds a cleanup reduction pass based on the given finder to the sequence of
|
||||
// passes that will run after other passes.
|
||||
void AddCleanupReductionPass(
|
||||
std::unique_ptr<ReductionOpportunityFinder>&& finder);
|
||||
std::unique_ptr<ReductionOpportunityFinder> finder);
|
||||
|
||||
// Reduces the given SPIR-V module |binary_out|.
|
||||
// The reduced binary ends up in |binary_out|.
|
||||
// A status is returned.
|
||||
ReductionResultStatus Run(std::vector<uint32_t>&& binary_in,
|
||||
ReductionResultStatus Run(const std::vector<uint32_t>& binary_in,
|
||||
std::vector<uint32_t>* binary_out,
|
||||
spv_const_reducer_options options,
|
||||
spv_validator_options validator_options);
|
||||
|
Loading…
Reference in New Issue
Block a user