SPIRV-Tools/test/fuzz
Alastair Donaldson 538512e8e8
spirv-fuzz: Improve the handling of equation facts (#3281)
The management of equation facts suffered from two problems:

(1) The processing of an equation fact required the data descriptors
    used in the equation to be in canonical form.  However, during
    fact processing it can be deduced that certain data descriptors
    are equivalent, causing their equivalence classes to be merged,
    and that could cause previously canonical data descriptors to no
    longer be canonical.

(2) Related to this, if id equations were known about a canonical data
    descriptor dd1, and other id equations known about a different
    canonical data descriptor dd2, the equation facts about these data
    descriptors were not being merged in the event that dd1 and dd2
    were deduced to be equivalent.

This changes solves (1) by not requiring equation facts to be in
canonical form while processing them, but instead always checking
whether (not necessary canonical) data descriptors are equivalent when
looking for corollaries of equation facts, rather than comparing them
using ==.

Problem (2) is solved by adding logic to merge sets of equations when
data descriptors are made equivalent.

In addition, the change also requires elements to be registered in an
equivalence relation before they can be made equivalent, rather than
being added (if not already present) at the point of being made
equivalent.
2020-04-07 17:38:27 +01:00
..
CMakeLists.txt spirv-fuzz: Transformation to add OpConstantNull (#3273) 2020-04-02 19:25:30 +01:00
data_synonym_transformation_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
equivalence_relation_test.cpp spirv-fuzz: Improve the handling of equation facts (#3281) 2020-04-07 17:38:27 +01:00
fact_manager_test.cpp spirv-fuzz: Improve the handling of equation facts (#3281) 2020-04-07 17:38:27 +01:00
fuzz_test_util.cpp spirv-fuzz: add dead blocks (#3135) 2020-01-13 22:04:01 +00:00
fuzz_test_util.h spirv-fuzz: Improve debugging facilities (#3074) 2019-11-27 18:05:56 +00:00
fuzzer_pass_add_useful_constructs_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
fuzzer_pass_construct_composites_test.cpp spirv-fuzz: Handle isomorphic types property in composite construction (#3262) 2020-04-02 18:33:19 +01:00
fuzzer_pass_donate_modules_test.cpp spirv-fuzz: Handle more general SPIR-V in donation (#3280) 2020-04-07 17:37:51 +01:00
fuzzer_replayer_test.cpp spirv-fuzz: Add validator options (#3254) 2020-04-02 14:37:59 +01:00
fuzzer_shrinker_test.cpp spirv-fuzz: Add validator options (#3254) 2020-04-02 14:37:59 +01:00
instruction_descriptor_test.cpp spirv-fuzz: fuzzer pass to adjust memory access operands (#2968) 2019-10-22 18:05:35 +01:00
transformation_access_chain_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_constant_boolean_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_constant_composite_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_constant_null_test.cpp spirv-fuzz: Transformation to add OpConstantNull (#3273) 2020-04-02 19:25:30 +01:00
transformation_add_constant_scalar_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_dead_block_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_dead_break_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_dead_continue_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_function_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_global_undef_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_global_variable_test.cpp spirv-fuzz: Improve support for compute shaders in donation (#3277) 2020-04-06 16:08:14 +01:00
transformation_add_local_variable_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_no_contraction_decoration_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_type_array_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_type_boolean_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_type_float_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_type_function_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_type_int_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_type_matrix_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_type_pointer_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_type_struct_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_add_type_vector_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_composite_construct_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_composite_extract_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_copy_object_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_equation_instruction_test.cpp spirv-fuzz: Improve the handling of equation facts (#3281) 2020-04-07 17:38:27 +01:00
transformation_function_call_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_load_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_merge_blocks_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_move_block_down_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_outline_function_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_permute_function_parameters_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_replace_boolean_constant_with_constant_binary_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_replace_constant_with_uniform_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_replace_id_with_synonym_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_set_function_control_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_set_loop_control_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_set_memory_operands_mask_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_set_selection_control_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_split_block_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_store_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_swap_commutable_operands_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_toggle_access_chain_instruction_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
transformation_vector_shuffle_test.cpp spirv-fuzz: Introduce TransformationContext (#3272) 2020-04-02 15:54:46 +01:00
uniform_buffer_element_descriptor_test.cpp Represent uniform facts via descriptor set and binding. (#2681) 2019-06-19 20:45:14 +01:00