mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-27 10:20:14 +00:00
746bfd210a
Replaced representation of uses * Changed uses from unordered_map<uint32_t, UseList> to set<pairInstruction*, Instruction*>> * Replaced GetUses with ForEachUser and ForEachUse functions * updated passes to use new functions * partially updated tests * lots of cleanup still todo Adding an unique id to Instruction generated by IRContext Each instruction is given an unique id that can be used for ordering purposes. The ids are generated via the IRContext. Major changes: * Instructions now contain a uint32_t for unique id and a cached context pointer * Most constructors have been modified to take a context as input * unfortunately I cannot remove the default and copy constructors, but developers should avoid these * Added accessors to parents of basic block and function * Removed the copy constructors for BasicBlock and Function and replaced them with Clone functions * Reworked BuildModule to return an IRContext owning the built module * Since all instructions require a context, the context now becomes the basic unit for IR * Added a constructor to context to create an owned module internally * Replaced uses of Instruction's copy constructor with Clone whereever I found them * Reworked the linker functionality to perform clones into a different context instead of moves * Updated many tests to be consistent with the above changes * Still need to add new tests to cover added functionality * Added comparison operators to Instruction Adding tests for Instruction, IRContext and IR loading Fixed some header comments for BuildModule Fixes to get tests passing again * Reordered two linker steps to avoid use/def problems * Fixed def/use manager uses in merge return pass * Added early return for GetAnnotations * Changed uses of Instruction::ToNop in passes to IRContext::KillInst Simplifying the uses for some contexts in passes |
||
---|---|---|
.. | ||
comp | ||
link | ||
opt | ||
scripts | ||
stats | ||
util | ||
val | ||
assembly_context_test.cpp | ||
assembly_format_test.cpp | ||
binary_destroy_test.cpp | ||
binary_endianness_test.cpp | ||
binary_header_get_test.cpp | ||
binary_parse_test.cpp | ||
binary_strnlen_s_test.cpp | ||
binary_to_text_test.cpp | ||
binary_to_text.literal_test.cpp | ||
bit_stream.cpp | ||
c_interface_test.cpp | ||
CMakeLists.txt | ||
comment_test.cpp | ||
cpp_interface_test.cpp | ||
diagnostic_test.cpp | ||
enum_set_test.cpp | ||
enum_string_mapping_test.cpp | ||
ext_inst.glsl_test.cpp | ||
ext_inst.opencl_test.cpp | ||
fix_word_test.cpp | ||
generator_magic_number_test.cpp | ||
hex_float_test.cpp | ||
huffman_codec.cpp | ||
immediate_int_test.cpp | ||
libspirv_macros_test.cpp | ||
log_test.cpp | ||
move_to_front_test.cpp | ||
name_mapper_test.cpp | ||
named_id_test.cpp | ||
opcode_make_test.cpp | ||
opcode_require_capabilities_test.cpp | ||
opcode_split_test.cpp | ||
opcode_table_get_test.cpp | ||
operand_capabilities_test.cpp | ||
operand_pattern_test.cpp | ||
operand_test.cpp | ||
operand-class-test-coverage.csv | ||
parse_number_test.cpp | ||
preserve_numeric_ids_test.cpp | ||
software_version_test.cpp | ||
string_utils_test.cpp | ||
target_env_test.cpp | ||
test_fixture.h | ||
text_advance_test.cpp | ||
text_destroy_test.cpp | ||
text_literal_test.cpp | ||
text_start_new_inst_test.cpp | ||
text_to_binary_test.cpp | ||
text_to_binary.annotation_test.cpp | ||
text_to_binary.barrier_test.cpp | ||
text_to_binary.constant_test.cpp | ||
text_to_binary.control_flow_test.cpp | ||
text_to_binary.debug_test.cpp | ||
text_to_binary.device_side_enqueue_test.cpp | ||
text_to_binary.extension_test.cpp | ||
text_to_binary.function_test.cpp | ||
text_to_binary.group_test.cpp | ||
text_to_binary.image_test.cpp | ||
text_to_binary.literal_test.cpp | ||
text_to_binary.memory_test.cpp | ||
text_to_binary.misc_test.cpp | ||
text_to_binary.mode_setting_test.cpp | ||
text_to_binary.pipe_storage_test.cpp | ||
text_to_binary.subgroup_dispatch_test.cpp | ||
text_to_binary.type_declaration_test.cpp | ||
text_word_get_test.cpp | ||
unit_spirv.cpp | ||
unit_spirv.h |