mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2025-01-11 09:00:06 +00:00
spirv-fuzz: Remove destructors from FuzzerPass subclasses (#4209)
Subclasses of FuzzerPass no longer needlessly override the default destructor of FuzzerPass.
This commit is contained in:
parent
3d39517961
commit
c0833ce620
@ -27,8 +27,6 @@ FuzzerPassAddAccessChains::FuzzerPassAddAccessChains(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddAccessChains::~FuzzerPassAddAccessChains() = default;
|
||||
|
||||
void FuzzerPassAddAccessChains::Apply() {
|
||||
ForEachInstructionWithInstructionDescriptor(
|
||||
[this](opt::Function* function, opt::BasicBlock* block,
|
||||
|
@ -30,8 +30,6 @@ class FuzzerPassAddAccessChains : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddAccessChains();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -28,9 +28,6 @@ FuzzerPassAddBitInstructionSynonyms::FuzzerPassAddBitInstructionSynonyms(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddBitInstructionSynonyms::~FuzzerPassAddBitInstructionSynonyms() =
|
||||
default;
|
||||
|
||||
void FuzzerPassAddBitInstructionSynonyms::Apply() {
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
for (auto& block : function) {
|
||||
|
@ -30,8 +30,6 @@ class FuzzerPassAddBitInstructionSynonyms : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddBitInstructionSynonyms();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -30,8 +30,6 @@ FuzzerPassAddCompositeExtract::FuzzerPassAddCompositeExtract(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddCompositeExtract::~FuzzerPassAddCompositeExtract() = default;
|
||||
|
||||
void FuzzerPassAddCompositeExtract::Apply() {
|
||||
std::vector<const protobufs::DataDescriptor*> composite_synonyms;
|
||||
for (const auto* dd :
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassAddCompositeExtract : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddCompositeExtract() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -29,8 +29,6 @@ FuzzerPassAddCompositeInserts::FuzzerPassAddCompositeInserts(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddCompositeInserts::~FuzzerPassAddCompositeInserts() = default;
|
||||
|
||||
void FuzzerPassAddCompositeInserts::Apply() {
|
||||
ForEachInstructionWithInstructionDescriptor(
|
||||
[this](opt::Function* function, opt::BasicBlock* block,
|
||||
|
@ -29,7 +29,6 @@ class FuzzerPassAddCompositeInserts : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddCompositeInserts();
|
||||
void Apply() override;
|
||||
|
||||
// Checks if any component of a composite is a pointer.
|
||||
|
@ -28,8 +28,6 @@ FuzzerPassAddCompositeTypes::FuzzerPassAddCompositeTypes(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddCompositeTypes::~FuzzerPassAddCompositeTypes() = default;
|
||||
|
||||
void FuzzerPassAddCompositeTypes::Apply() {
|
||||
MaybeAddMissingVectorTypes();
|
||||
MaybeAddMissingMatrixTypes();
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassAddCompositeTypes : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddCompositeTypes();
|
||||
|
||||
void Apply() override;
|
||||
|
||||
private:
|
||||
|
@ -29,8 +29,6 @@ FuzzerPassAddCopyMemory::FuzzerPassAddCopyMemory(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddCopyMemory::~FuzzerPassAddCopyMemory() = default;
|
||||
|
||||
void FuzzerPassAddCopyMemory::Apply() {
|
||||
ForEachInstructionWithInstructionDescriptor(
|
||||
[this](opt::Function* function, opt::BasicBlock* block,
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassAddCopyMemory : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddCopyMemory() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -27,8 +27,6 @@ FuzzerPassAddDeadBlocks::FuzzerPassAddDeadBlocks(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddDeadBlocks::~FuzzerPassAddDeadBlocks() = default;
|
||||
|
||||
void FuzzerPassAddDeadBlocks::Apply() {
|
||||
// We iterate over all blocks in the module collecting up those at which we
|
||||
// might add a branch to a new dead block. We then loop over all such
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassAddDeadBlocks : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddDeadBlocks();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -28,8 +28,6 @@ FuzzerPassAddDeadBreaks::FuzzerPassAddDeadBreaks(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddDeadBreaks::~FuzzerPassAddDeadBreaks() = default;
|
||||
|
||||
void FuzzerPassAddDeadBreaks::Apply() {
|
||||
// We first collect up lots of possibly-applicable transformations.
|
||||
std::vector<TransformationAddDeadBreak> candidate_transformations;
|
||||
|
@ -28,8 +28,6 @@ class FuzzerPassAddDeadBreaks : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddDeadBreaks();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -28,8 +28,6 @@ FuzzerPassAddDeadContinues::FuzzerPassAddDeadContinues(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddDeadContinues::~FuzzerPassAddDeadContinues() = default;
|
||||
|
||||
void FuzzerPassAddDeadContinues::Apply() {
|
||||
// Consider every block in every function.
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
|
@ -28,8 +28,6 @@ class FuzzerPassAddDeadContinues : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddDeadContinues();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -49,9 +49,6 @@ FuzzerPassAddEquationInstructions::FuzzerPassAddEquationInstructions(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddEquationInstructions::~FuzzerPassAddEquationInstructions() =
|
||||
default;
|
||||
|
||||
void FuzzerPassAddEquationInstructions::Apply() {
|
||||
ForEachInstructionWithInstructionDescriptor(
|
||||
[this](opt::Function* function, opt::BasicBlock* block,
|
||||
|
@ -31,8 +31,6 @@ class FuzzerPassAddEquationInstructions : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddEquationInstructions();
|
||||
|
||||
void Apply() override;
|
||||
|
||||
private:
|
||||
|
@ -30,8 +30,6 @@ FuzzerPassAddFunctionCalls::FuzzerPassAddFunctionCalls(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddFunctionCalls::~FuzzerPassAddFunctionCalls() = default;
|
||||
|
||||
void FuzzerPassAddFunctionCalls::Apply() {
|
||||
ForEachInstructionWithInstructionDescriptor(
|
||||
[this](opt::Function* function, opt::BasicBlock* block,
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassAddFunctionCalls : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddFunctionCalls();
|
||||
|
||||
void Apply() override;
|
||||
|
||||
private:
|
||||
|
@ -27,8 +27,6 @@ FuzzerPassAddGlobalVariables::FuzzerPassAddGlobalVariables(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddGlobalVariables::~FuzzerPassAddGlobalVariables() = default;
|
||||
|
||||
void FuzzerPassAddGlobalVariables::Apply() {
|
||||
SpvStorageClass variable_storage_class = SpvStorageClassPrivate;
|
||||
for (auto& entry_point : GetIRContext()->module()->entry_points()) {
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassAddGlobalVariables : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddGlobalVariables();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -31,9 +31,6 @@ FuzzerPassAddImageSampleUnusedComponents::
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddImageSampleUnusedComponents::
|
||||
~FuzzerPassAddImageSampleUnusedComponents() = default;
|
||||
|
||||
void FuzzerPassAddImageSampleUnusedComponents::Apply() {
|
||||
// SPIR-V module to help understand the transformation.
|
||||
//
|
||||
|
@ -30,8 +30,6 @@ class FuzzerPassAddImageSampleUnusedComponents : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddImageSampleUnusedComponents();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -27,8 +27,6 @@ FuzzerPassAddLoads::FuzzerPassAddLoads(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddLoads::~FuzzerPassAddLoads() = default;
|
||||
|
||||
void FuzzerPassAddLoads::Apply() {
|
||||
ForEachInstructionWithInstructionDescriptor(
|
||||
[this](opt::Function* function, opt::BasicBlock* block,
|
||||
|
@ -28,8 +28,6 @@ class FuzzerPassAddLoads : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddLoads();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -28,8 +28,6 @@ FuzzerPassAddLocalVariables::FuzzerPassAddLocalVariables(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddLocalVariables::~FuzzerPassAddLocalVariables() = default;
|
||||
|
||||
void FuzzerPassAddLocalVariables::Apply() {
|
||||
auto basic_type_ids_and_pointers =
|
||||
GetAvailableBasicTypesAndPointers(SpvStorageClassFunction);
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassAddLocalVariables : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddLocalVariables();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -27,8 +27,6 @@ FuzzerPassAddLoopPreheaders::FuzzerPassAddLoopPreheaders(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddLoopPreheaders::~FuzzerPassAddLoopPreheaders() = default;
|
||||
|
||||
void FuzzerPassAddLoopPreheaders::Apply() {
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
// Keep track of all the loop headers we want to add a preheader to.
|
||||
|
@ -32,8 +32,6 @@ class FuzzerPassAddLoopPreheaders : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddLoopPreheaders();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -33,9 +33,6 @@ FuzzerPassAddLoopsToCreateIntConstantSynonyms::
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddLoopsToCreateIntConstantSynonyms::
|
||||
~FuzzerPassAddLoopsToCreateIntConstantSynonyms() = default;
|
||||
|
||||
void FuzzerPassAddLoopsToCreateIntConstantSynonyms::Apply() {
|
||||
std::vector<uint32_t> constants;
|
||||
|
||||
|
@ -30,8 +30,6 @@ class FuzzerPassAddLoopsToCreateIntConstantSynonyms : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddLoopsToCreateIntConstantSynonyms();
|
||||
|
||||
void Apply() override;
|
||||
|
||||
private:
|
||||
|
@ -26,9 +26,6 @@ FuzzerPassAddNoContractionDecorations::FuzzerPassAddNoContractionDecorations(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddNoContractionDecorations::
|
||||
~FuzzerPassAddNoContractionDecorations() = default;
|
||||
|
||||
void FuzzerPassAddNoContractionDecorations::Apply() {
|
||||
// Consider every instruction in every block in every function.
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
|
@ -28,8 +28,6 @@ class FuzzerPassAddNoContractionDecorations : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddNoContractionDecorations() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -27,8 +27,6 @@ FuzzerPassAddOpPhiSynonyms::FuzzerPassAddOpPhiSynonyms(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddOpPhiSynonyms::~FuzzerPassAddOpPhiSynonyms() = default;
|
||||
|
||||
void FuzzerPassAddOpPhiSynonyms::Apply() {
|
||||
// Get a list of synonymous ids with the same type that can be used in the
|
||||
// same OpPhi instruction.
|
||||
|
@ -30,8 +30,6 @@ class FuzzerPassAddOpPhiSynonyms : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddOpPhiSynonyms() override;
|
||||
|
||||
void Apply() override;
|
||||
|
||||
// Computes the equivalence classes for the non-pointer and non-irrelevant ids
|
||||
|
@ -29,8 +29,6 @@ FuzzerPassAddParameters::FuzzerPassAddParameters(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddParameters::~FuzzerPassAddParameters() = default;
|
||||
|
||||
void FuzzerPassAddParameters::Apply() {
|
||||
// Compute type candidates for the new parameter.
|
||||
std::vector<uint32_t> type_candidates;
|
||||
|
@ -32,8 +32,6 @@ class FuzzerPassAddParameters : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddParameters() override;
|
||||
|
||||
void Apply() override;
|
||||
|
||||
private:
|
||||
|
@ -26,8 +26,6 @@ FuzzerPassAddRelaxedDecorations::FuzzerPassAddRelaxedDecorations(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddRelaxedDecorations::~FuzzerPassAddRelaxedDecorations() = default;
|
||||
|
||||
void FuzzerPassAddRelaxedDecorations::Apply() {
|
||||
// Consider every instruction in every block in every function.
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
|
@ -28,8 +28,6 @@ class FuzzerPassAddRelaxedDecorations : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddRelaxedDecorations() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -27,8 +27,6 @@ FuzzerPassAddStores::FuzzerPassAddStores(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddStores::~FuzzerPassAddStores() = default;
|
||||
|
||||
void FuzzerPassAddStores::Apply() {
|
||||
ForEachInstructionWithInstructionDescriptor(
|
||||
[this](opt::Function* function, opt::BasicBlock* block,
|
||||
|
@ -30,8 +30,6 @@ class FuzzerPassAddStores : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddStores();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -29,8 +29,6 @@ FuzzerPassAddSynonyms::FuzzerPassAddSynonyms(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddSynonyms::~FuzzerPassAddSynonyms() = default;
|
||||
|
||||
void FuzzerPassAddSynonyms::Apply() {
|
||||
ForEachInstructionWithInstructionDescriptor(
|
||||
[this](opt::Function* function, opt::BasicBlock* block,
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassAddSynonyms : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddSynonyms() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -28,9 +28,6 @@ FuzzerPassAddVectorShuffleInstructions::FuzzerPassAddVectorShuffleInstructions(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAddVectorShuffleInstructions::
|
||||
~FuzzerPassAddVectorShuffleInstructions() = default;
|
||||
|
||||
void FuzzerPassAddVectorShuffleInstructions::Apply() {
|
||||
ForEachInstructionWithInstructionDescriptor(
|
||||
[this](opt::Function* function, opt::BasicBlock* block,
|
||||
|
@ -28,8 +28,6 @@ class FuzzerPassAddVectorShuffleInstructions : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAddVectorShuffleInstructions();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -28,8 +28,6 @@ FuzzerPassAdjustBranchWeights::FuzzerPassAdjustBranchWeights(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAdjustBranchWeights::~FuzzerPassAdjustBranchWeights() = default;
|
||||
|
||||
void FuzzerPassAdjustBranchWeights::Apply() {
|
||||
// For all OpBranchConditional instructions,
|
||||
// randomly applies the transformation.
|
||||
|
@ -30,8 +30,6 @@ class FuzzerPassAdjustBranchWeights : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAdjustBranchWeights();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -26,8 +26,6 @@ FuzzerPassAdjustFunctionControls::FuzzerPassAdjustFunctionControls(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAdjustFunctionControls::~FuzzerPassAdjustFunctionControls() = default;
|
||||
|
||||
void FuzzerPassAdjustFunctionControls::Apply() {
|
||||
// Consider every function in the module.
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
|
@ -28,8 +28,6 @@ class FuzzerPassAdjustFunctionControls : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAdjustFunctionControls() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -26,8 +26,6 @@ FuzzerPassAdjustLoopControls::FuzzerPassAdjustLoopControls(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAdjustLoopControls::~FuzzerPassAdjustLoopControls() = default;
|
||||
|
||||
void FuzzerPassAdjustLoopControls::Apply() {
|
||||
// Consider every merge instruction in the module (via looking through all
|
||||
// functions and blocks).
|
||||
|
@ -28,8 +28,6 @@ class FuzzerPassAdjustLoopControls : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAdjustLoopControls() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -27,9 +27,6 @@ FuzzerPassAdjustMemoryOperandsMasks::FuzzerPassAdjustMemoryOperandsMasks(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAdjustMemoryOperandsMasks::~FuzzerPassAdjustMemoryOperandsMasks() =
|
||||
default;
|
||||
|
||||
void FuzzerPassAdjustMemoryOperandsMasks::Apply() {
|
||||
// Consider every block in every function.
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassAdjustMemoryOperandsMasks : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAdjustMemoryOperandsMasks();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -26,9 +26,6 @@ FuzzerPassAdjustSelectionControls::FuzzerPassAdjustSelectionControls(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassAdjustSelectionControls::~FuzzerPassAdjustSelectionControls() =
|
||||
default;
|
||||
|
||||
void FuzzerPassAdjustSelectionControls::Apply() {
|
||||
// Consider every merge instruction in the module (via looking through all
|
||||
// functions and blocks).
|
||||
|
@ -28,8 +28,6 @@ class FuzzerPassAdjustSelectionControls : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassAdjustSelectionControls() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -32,8 +32,6 @@ FuzzerPassApplyIdSynonyms::FuzzerPassApplyIdSynonyms(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassApplyIdSynonyms::~FuzzerPassApplyIdSynonyms() = default;
|
||||
|
||||
void FuzzerPassApplyIdSynonyms::Apply() {
|
||||
// Compute a closure of data synonym facts, to enrich the pool of synonyms
|
||||
// that are available.
|
||||
|
@ -30,8 +30,6 @@ class FuzzerPassApplyIdSynonyms : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassApplyIdSynonyms() override;
|
||||
|
||||
void Apply() override;
|
||||
|
||||
private:
|
||||
|
@ -29,8 +29,6 @@ FuzzerPassConstructComposites::FuzzerPassConstructComposites(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassConstructComposites::~FuzzerPassConstructComposites() = default;
|
||||
|
||||
void FuzzerPassConstructComposites::Apply() {
|
||||
// Gather up the ids of all composite types, but skip block-/buffer
|
||||
// block-decorated struct types.
|
||||
|
@ -31,8 +31,6 @@ class FuzzerPassConstructComposites : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassConstructComposites();
|
||||
|
||||
void Apply() override;
|
||||
|
||||
private:
|
||||
|
@ -28,8 +28,6 @@ FuzzerPassCopyObjects::FuzzerPassCopyObjects(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassCopyObjects::~FuzzerPassCopyObjects() = default;
|
||||
|
||||
void FuzzerPassCopyObjects::Apply() {
|
||||
ForEachInstructionWithInstructionDescriptor(
|
||||
[this](opt::Function* function, opt::BasicBlock* block,
|
||||
|
@ -28,8 +28,6 @@ class FuzzerPassCopyObjects : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassCopyObjects();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -50,8 +50,6 @@ FuzzerPassDonateModules::FuzzerPassDonateModules(
|
||||
transformations),
|
||||
donor_suppliers_(donor_suppliers) {}
|
||||
|
||||
FuzzerPassDonateModules::~FuzzerPassDonateModules() = default;
|
||||
|
||||
void FuzzerPassDonateModules::Apply() {
|
||||
// If there are no donor suppliers, this fuzzer pass is a no-op.
|
||||
if (donor_suppliers_.empty()) {
|
||||
|
@ -33,8 +33,6 @@ class FuzzerPassDonateModules : public FuzzerPass {
|
||||
protobufs::TransformationSequence* transformations,
|
||||
const std::vector<fuzzerutil::ModuleSupplier>& donor_suppliers);
|
||||
|
||||
~FuzzerPassDonateModules();
|
||||
|
||||
void Apply() override;
|
||||
|
||||
// Donates the global declarations and functions of |donor_ir_context| into
|
||||
|
@ -29,9 +29,6 @@ FuzzerPassDuplicateRegionsWithSelections::
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassDuplicateRegionsWithSelections::
|
||||
~FuzzerPassDuplicateRegionsWithSelections() = default;
|
||||
|
||||
void FuzzerPassDuplicateRegionsWithSelections::Apply() {
|
||||
// Iterate over all of the functions in the module.
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
|
@ -31,8 +31,6 @@ class FuzzerPassDuplicateRegionsWithSelections : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassDuplicateRegionsWithSelections() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -28,8 +28,6 @@ FuzzerPassExpandVectorReductions::FuzzerPassExpandVectorReductions(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassExpandVectorReductions::~FuzzerPassExpandVectorReductions() = default;
|
||||
|
||||
void FuzzerPassExpandVectorReductions::Apply() {
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
for (auto& block : function) {
|
||||
|
@ -30,8 +30,6 @@ class FuzzerPassExpandVectorReductions : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassExpandVectorReductions();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -30,9 +30,6 @@ FuzzerPassFlattenConditionalBranches::FuzzerPassFlattenConditionalBranches(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassFlattenConditionalBranches::~FuzzerPassFlattenConditionalBranches() =
|
||||
default;
|
||||
|
||||
void FuzzerPassFlattenConditionalBranches::Apply() {
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
// Get all the selection headers that we want to flatten. We need to collect
|
||||
|
@ -27,8 +27,6 @@ class FuzzerPassFlattenConditionalBranches : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassFlattenConditionalBranches() override;
|
||||
|
||||
void Apply() override;
|
||||
|
||||
private:
|
||||
|
@ -29,8 +29,6 @@ FuzzerPassInlineFunctions::FuzzerPassInlineFunctions(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassInlineFunctions::~FuzzerPassInlineFunctions() = default;
|
||||
|
||||
void FuzzerPassInlineFunctions::Apply() {
|
||||
// |function_call_instructions| are the instructions that will be inlined.
|
||||
// First, they will be collected and then do the inlining in another loop.
|
||||
|
@ -30,8 +30,6 @@ class FuzzerPassInlineFunctions : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassInlineFunctions() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -31,9 +31,6 @@ FuzzerPassInterchangeSignednessOfIntegerOperands::
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassInterchangeSignednessOfIntegerOperands::
|
||||
~FuzzerPassInterchangeSignednessOfIntegerOperands() = default;
|
||||
|
||||
void FuzzerPassInterchangeSignednessOfIntegerOperands::Apply() {
|
||||
assert(!GetFuzzerContext()->IsWgslCompatible() &&
|
||||
"Cannot interchange signedness in WGSL");
|
||||
|
@ -34,8 +34,6 @@ class FuzzerPassInterchangeSignednessOfIntegerOperands : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassInterchangeSignednessOfIntegerOperands() override;
|
||||
|
||||
void Apply() override;
|
||||
|
||||
private:
|
||||
|
@ -29,9 +29,6 @@ FuzzerPassInterchangeZeroLikeConstants::FuzzerPassInterchangeZeroLikeConstants(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassInterchangeZeroLikeConstants::
|
||||
~FuzzerPassInterchangeZeroLikeConstants() = default;
|
||||
|
||||
uint32_t FuzzerPassInterchangeZeroLikeConstants::FindOrCreateToggledConstant(
|
||||
opt::Instruction* declaration) {
|
||||
// |declaration| must not be a specialization constant because we do not know
|
||||
|
@ -35,8 +35,6 @@ class FuzzerPassInterchangeZeroLikeConstants : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassInterchangeZeroLikeConstants() override;
|
||||
|
||||
void Apply() override;
|
||||
|
||||
private:
|
||||
|
@ -28,9 +28,6 @@ FuzzerPassInvertComparisonOperators::FuzzerPassInvertComparisonOperators(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassInvertComparisonOperators::~FuzzerPassInvertComparisonOperators() =
|
||||
default;
|
||||
|
||||
void FuzzerPassInvertComparisonOperators::Apply() {
|
||||
GetIRContext()->module()->ForEachInst([this](const opt::Instruction* inst) {
|
||||
if (!TransformationInvertComparisonOperator::IsInversionSupported(
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassInvertComparisonOperators : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassInvertComparisonOperators() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -28,9 +28,6 @@ FuzzerPassMakeVectorOperationsDynamic::FuzzerPassMakeVectorOperationsDynamic(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassMakeVectorOperationsDynamic::
|
||||
~FuzzerPassMakeVectorOperationsDynamic() = default;
|
||||
|
||||
void FuzzerPassMakeVectorOperationsDynamic::Apply() {
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
for (auto& block : function) {
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassMakeVectorOperationsDynamic : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassMakeVectorOperationsDynamic() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -28,8 +28,6 @@ FuzzerPassMergeBlocks::FuzzerPassMergeBlocks(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassMergeBlocks::~FuzzerPassMergeBlocks() = default;
|
||||
|
||||
void FuzzerPassMergeBlocks::Apply() {
|
||||
// First we populate a sequence of transformations that we might consider
|
||||
// applying.
|
||||
|
@ -28,8 +28,6 @@ class FuzzerPassMergeBlocks : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassMergeBlocks();
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -30,8 +30,6 @@ FuzzerPassMergeFunctionReturns::FuzzerPassMergeFunctionReturns(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassMergeFunctionReturns::~FuzzerPassMergeFunctionReturns() = default;
|
||||
|
||||
void FuzzerPassMergeFunctionReturns::Apply() {
|
||||
// The pass might add new functions to the module (due to wrapping early
|
||||
// terminator instructions in function calls), so we record the functions that
|
||||
|
@ -33,8 +33,6 @@ class FuzzerPassMergeFunctionReturns : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassMergeFunctionReturns();
|
||||
|
||||
void Apply() override;
|
||||
|
||||
private:
|
||||
|
@ -28,8 +28,6 @@ FuzzerPassMutatePointers::FuzzerPassMutatePointers(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassMutatePointers::~FuzzerPassMutatePointers() = default;
|
||||
|
||||
void FuzzerPassMutatePointers::Apply() {
|
||||
ForEachInstructionWithInstructionDescriptor(
|
||||
[this](opt::Function* function, opt::BasicBlock* block,
|
||||
|
@ -28,8 +28,6 @@ class FuzzerPassMutatePointers : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassMutatePointers() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -34,8 +34,6 @@ FuzzerPassObfuscateConstants::FuzzerPassObfuscateConstants(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassObfuscateConstants::~FuzzerPassObfuscateConstants() = default;
|
||||
|
||||
void FuzzerPassObfuscateConstants::ObfuscateBoolConstantViaConstantPair(
|
||||
uint32_t depth, const protobufs::IdUseDescriptor& bool_constant_use,
|
||||
const std::vector<SpvOp>& greater_than_opcodes,
|
||||
|
@ -32,8 +32,6 @@ class FuzzerPassObfuscateConstants : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassObfuscateConstants() override;
|
||||
|
||||
void Apply() override;
|
||||
|
||||
private:
|
||||
|
@ -31,8 +31,6 @@ FuzzerPassOutlineFunctions::FuzzerPassOutlineFunctions(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassOutlineFunctions::~FuzzerPassOutlineFunctions() = default;
|
||||
|
||||
void FuzzerPassOutlineFunctions::Apply() {
|
||||
std::vector<opt::Function*> original_functions;
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassOutlineFunctions : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassOutlineFunctions();
|
||||
|
||||
void Apply() override;
|
||||
|
||||
// Returns a block suitable to be an entry block for a region that can be
|
||||
|
@ -26,8 +26,6 @@ FuzzerPassPermuteBlocks::FuzzerPassPermuteBlocks(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassPermuteBlocks::~FuzzerPassPermuteBlocks() = default;
|
||||
|
||||
void FuzzerPassPermuteBlocks::Apply() {
|
||||
// For now we do something very simple: we randomly decide whether to move a
|
||||
// block, and for each block that we do move, we push it down as far as we
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassPermuteBlocks : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassPermuteBlocks() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -32,9 +32,6 @@ FuzzerPassPermuteFunctionParameters::FuzzerPassPermuteFunctionParameters(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassPermuteFunctionParameters::~FuzzerPassPermuteFunctionParameters() =
|
||||
default;
|
||||
|
||||
void FuzzerPassPermuteFunctionParameters::Apply() {
|
||||
for (const auto& function : *GetIRContext()->module()) {
|
||||
uint32_t function_id = function.result_id();
|
||||
|
@ -34,8 +34,6 @@ class FuzzerPassPermuteFunctionParameters : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassPermuteFunctionParameters() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -29,8 +29,6 @@ FuzzerPassPermuteInstructions::FuzzerPassPermuteInstructions(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassPermuteInstructions::~FuzzerPassPermuteInstructions() = default;
|
||||
|
||||
void FuzzerPassPermuteInstructions::Apply() {
|
||||
// We are iterating over all instructions in all basic blocks.
|
||||
for (auto& function : *GetIRContext()->module()) {
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassPermuteInstructions : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassPermuteInstructions() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
@ -32,8 +32,6 @@ FuzzerPassPermutePhiOperands::FuzzerPassPermutePhiOperands(
|
||||
: FuzzerPass(ir_context, transformation_context, fuzzer_context,
|
||||
transformations) {}
|
||||
|
||||
FuzzerPassPermutePhiOperands::~FuzzerPassPermutePhiOperands() = default;
|
||||
|
||||
void FuzzerPassPermutePhiOperands::Apply() {
|
||||
ForEachInstructionWithInstructionDescriptor(
|
||||
[this](opt::Function* /*unused*/, opt::BasicBlock* /*unused*/,
|
||||
|
@ -29,8 +29,6 @@ class FuzzerPassPermutePhiOperands : public FuzzerPass {
|
||||
FuzzerContext* fuzzer_context,
|
||||
protobufs::TransformationSequence* transformations);
|
||||
|
||||
~FuzzerPassPermutePhiOperands() override;
|
||||
|
||||
void Apply() override;
|
||||
};
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user