SPIRV-Tools/test
Diego Novillo 735d8a579e SSA rewrite pass.
This pass replaces the load/store elimination passes.  It implements the
SSA re-writing algorithm proposed in

     Simple and Efficient Construction of Static Single Assignment Form.
     Braun M., Buchwald S., Hack S., Leißa R., Mallon C., Zwinkau A. (2013)
     In: Jhala R., De Bosschere K. (eds)
     Compiler Construction. CC 2013.
     Lecture Notes in Computer Science, vol 7791.
     Springer, Berlin, Heidelberg

     https://link.springer.com/chapter/10.1007/978-3-642-37051-9_6

In contrast to common eager algorithms based on dominance and dominance
frontier information, this algorithm works backwards from load operations.

When a target variable is loaded, it queries the variable's reaching
definition.  If the reaching definition is unknown at the current location,
it searches backwards in the CFG, inserting Phi instructions at join points
in the CFG along the way until it finds the desired store instruction.

The algorithm avoids repeated lookups using memoization.

For reducible CFGs, which are a superset of the structured CFGs in SPIRV,
this algorithm is proven to produce minimal SSA.  That is, it inserts the
minimal number of Phi instructions required to ensure the SSA property, but
some Phi instructions may be dead
(https://en.wikipedia.org/wiki/Static_single_assignment_form).
2018-03-20 20:56:55 -04:00
..
comp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
link linker: merge debug annotations from category c) 2018-02-27 12:31:50 -05:00
opt SSA rewrite pass. 2018-03-20 20:56:55 -04:00
scripts Added --compact-ids to /tools/opt 2017-04-20 10:54:39 -04:00
stats Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
util Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
val Migrate to use unified grammar tables 2018-03-17 15:25:26 -04:00
assembly_context_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
assembly_format_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
binary_destroy_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
binary_endianness_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
binary_header_get_test.cpp Support SPIR-V 1.3 and Vulkan 1.1 2018-03-06 15:17:31 -05:00
binary_parse_test.cpp Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
binary_strnlen_s_test.cpp Support building under CYGWIN 2016-12-21 10:34:23 -05:00
binary_to_text_test.cpp Support SPIR-V 1.3 and Vulkan 1.1 2018-03-06 15:17:31 -05:00
binary_to_text.literal_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
bit_stream.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
c_interface_test.cpp Build SPIRV-Tools as shared library 2018-02-07 10:43:32 -05:00
CMakeLists.txt Migrate to use unified grammar tables 2018-03-17 15:25:26 -04:00
comment_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
cpp_interface_test.cpp Add SpirvTools::Validate that takes an options object 2017-03-17 12:48:51 -04:00
diagnostic_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
enum_set_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
enum_string_mapping_test.cpp Support SPV_GOOGLE_decorate_string and SPV_GOOGLE_hlsl_functionality1 2018-03-05 13:34:13 -05:00
ext_inst.debuginfo_test.cpp Add asm, dis support for DebugInfo extended instruction set 2017-12-22 09:39:36 -05:00
ext_inst.glsl_test.cpp Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
ext_inst.opencl_test.cpp Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
fix_word_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
generator_magic_number_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
hex_float_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
huffman_codec.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
immediate_int_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
libspirv_macros_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
log_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
move_to_front_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
name_mapper_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
named_id_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
opcode_make_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
opcode_require_capabilities_test.cpp Migrate to use unified grammar tables 2018-03-17 15:25:26 -04:00
opcode_split_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
opcode_table_get_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
operand_capabilities_test.cpp Migrate to use unified grammar tables 2018-03-17 15:25:26 -04:00
operand_pattern_test.cpp Migrate to use unified grammar tables 2018-03-17 15:25:26 -04:00
operand_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
operand-class-test-coverage.csv Fix operand class test coverage table. 2016-09-23 11:58:25 -04:00
parse_number_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
preserve_numeric_ids_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
software_version_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
string_utils_test.cpp Validator checks if operands require extension 2017-03-14 13:39:43 -04:00
target_env_test.cpp Support SPIR-V 1.3 and Vulkan 1.1 2018-03-06 15:17:31 -05:00
test_fixture.h Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
text_advance_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
text_destroy_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
text_literal_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_start_new_inst_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
text_to_binary_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.annotation_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.barrier_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.constant_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.control_flow_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.debug_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.device_side_enqueue_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.extension_test.cpp Migrate to use unified grammar tables 2018-03-17 15:25:26 -04:00
text_to_binary.function_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
text_to_binary.group_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
text_to_binary.image_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.literal_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
text_to_binary.memory_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.misc_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.mode_setting_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.pipe_storage_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.reserved_sampling_test.cpp Migrate to use unified grammar tables 2018-03-17 15:25:26 -04:00
text_to_binary.subgroup_dispatch_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_to_binary.type_declaration_test.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
text_word_get_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
unit_spirv.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
unit_spirv.h Support SPIR-V 1.3 and Vulkan 1.1 2018-03-06 15:17:31 -05:00