Commit Graph

11 Commits

Author SHA1 Message Date
Alastair Donaldson
bed84792f9
spirv-fuzz: Call by value and move in transformations (#4208)
Adapts all transformation classes so that their protobuf message is
passed by value and then moved into the message_ field.
2021-03-23 13:31:44 +00:00
Alastair Donaldson
4e31fdd4aa
spirv-fuzz: Fix OpPhi handling in DuplicateRegionWithSelection (#4065)
Avoid generating OpPhi on void types, and allow the transformation to
take place on regions that produce pointer and sampled image result
ids if such ids are not used after the region.

Fixes #3787.
2020-12-17 11:45:52 +00:00
Alastair Donaldson
a3d5378df6
spirv-fuzz: Do not produce OpPhis of type OpTypeSampledImage (#3964)
Also removes some redundant validity checks in tests.

Fixes #3950.
2020-10-21 21:12:19 +01:00
Alastair Donaldson
ba15b58862
spirv-fuzz: Fix to TransformationDuplicateRegionWithSelection (#3941)
Also incorporates a few style fixes.

Fixes #3940.
2020-10-20 18:59:53 +01:00
Alastair Donaldson
4b884928db
spirv-fuzz: Fix to duplicate region with selection (#3896)
Fixes #3895.
2020-10-13 14:25:43 +01:00
Alastair Donaldson
624b16cd0c
spirv-fuzz: Use overflow ids when duplicating regions (#3878)
Fixes #3786.
2020-10-06 12:07:20 +01:00
Alastair Donaldson
fcb22ecf0f
spirv-fuzz: Report fresh ids in transformations (#3856)
Adds a virtual method, GetFreshIds(), to Transformation. Every
transformation uses this to indicate which ids in its protobuf message
are fresh ids. This means that when replaying a sequence of
transformations the replayer can obtain a smallest id that is not in
use by the module already and that will not be used by any
transformation by necessity. Ids greater than or equal to this id
can be used as overflow ids.

Fixes #3851.
2020-09-29 22:12:49 +01:00
Antoni Karpiński
4b07d50cd9
spirv-fuzz: Fix bug in TransformationDuplicateRegionWithSelection (#3819)
The following changes are introduced:

1. Entry block might have more than one predecessor, even if it is not
   a selection/loop merge block. However Apply method asserts that
   there is only one predecessor. Now, IsApplicable method ensures
   that there is only one predecessor.

2. In fuzzer pass we exclude both loop headers and selection headers
as potential exit blocks.

Fixes #3827.
2020-09-26 19:18:41 +01:00
Alastair Donaldson
60ce96e2ff
spirv-fuzz: Add pass recommendations (#3757)
This change introduces various strategies for controlling the manner
in which fuzzer passes are applied repeatedly, including infrastructure
to allow fuzzer passes to be recommended based on which passes ran
previously.
2020-09-18 15:51:35 +01:00
Antoni Karpiński
296e9c7bc8
spirv-fuzz: Fix TransformationDuplicateRegionWithSelection (#3815)
Introduces two changes:

- duplicated_exit_region refers to a correct block, regardless of the order
  of the blocks in the enclosing function.
- Exclude the case where the continue target is the exit block.
2020-09-18 05:36:08 +01:00
Antoni Karpiński
244e6c1be6
spirv-fuzz: Add TransformationDuplicateRegionWithSelection (#3773)
Adds a transformation that inserts a conditional statement with a
boolean expression of arbitrary value and duplicates a given
single-entry, single-exit region, so that it is present in each
conditional branch and will be executed regardless of which branch will
be taken.

Fixes #3614.
2020-09-11 11:48:19 +01:00