summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/3rdparty/spirv-tools/source/fuzz/transformation_copy_object.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/3rdparty/spirv-tools/source/fuzz/transformation_copy_object.h')
-rw-r--r--3rdparty/bgfx/3rdparty/spirv-tools/source/fuzz/transformation_copy_object.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/3rdparty/bgfx/3rdparty/spirv-tools/source/fuzz/transformation_copy_object.h b/3rdparty/bgfx/3rdparty/spirv-tools/source/fuzz/transformation_copy_object.h
index 20e58749b45..3a75ac9d9ba 100644
--- a/3rdparty/bgfx/3rdparty/spirv-tools/source/fuzz/transformation_copy_object.h
+++ b/3rdparty/bgfx/3rdparty/spirv-tools/source/fuzz/transformation_copy_object.h
@@ -28,8 +28,10 @@ class TransformationCopyObject : public Transformation {
explicit TransformationCopyObject(
const protobufs::TransformationCopyObject& message);
- TransformationCopyObject(uint32_t object, uint32_t base_instruction_id,
- uint32_t offset, uint32_t fresh_id);
+ TransformationCopyObject(
+ uint32_t object,
+ const protobufs::InstructionDescriptor& instruction_to_insert_before,
+ uint32_t fresh_id);
// - |message_.fresh_id| must not be used by the module.
// - |message_.object| must be a result id that is a legitimate operand for
@@ -37,14 +39,14 @@ class TransformationCopyObject : public Transformation {
// has a result type
// - |message_.object| must not be the target of any decoration.
// TODO(afd): consider copying decorations along with objects.
- // - |message_.insert_after_id| must be the result id of an instruction
+ // - |message_.base_instruction_id| must be the result id of an instruction
// 'base' in some block 'blk'.
// - 'blk' must contain an instruction 'inst' located |message_.offset|
// instructions after 'base' (if |message_.offset| = 0 then 'inst' =
// 'base').
// - It must be legal to insert an OpCopyObject instruction directly
// before 'inst'.
- // - |message_object| must be available directly before 'inst'.
+ // - |message_.object| must be available directly before 'inst'.
bool IsApplicable(opt::IRContext* context,
const FactManager& fact_manager) const override;
@@ -58,14 +60,6 @@ class TransformationCopyObject : public Transformation {
protobufs::Transformation ToMessage() const override;
- // Determines whether it is OK to make a copy of |inst|.
- static bool IsCopyable(opt::IRContext* ir_context, opt::Instruction* inst);
-
- // Determines whether it is OK to insert a copy instruction before the given
- // instruction.
- static bool CanInsertCopyBefore(
- const opt::BasicBlock::iterator& instruction_in_block);
-
private:
protobufs::TransformationCopyObject message_;
};