SPIRV-Tools/test/opt
Alan Baker 746bfd210a Adding new def -> use mapping container
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
2017-11-23 16:40:02 -05:00
..
aggressive_dead_code_elim_test.cpp ADCE: Dead if elimination 2017-10-31 11:51:30 -04:00
assembly_builder_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
assembly_builder.h Relicense SPIRV-Tools under Apache 2.0 2016-09-02 10:00:29 -04:00
block_merge_test.cpp BlockMerge: Add BlockMergePass 2017-06-27 11:31:33 -04:00
cfg_cleanup_test.cpp The reviewed cfg_cleanup optimize pass 2017-10-19 15:28:09 -04:00
CMakeLists.txt Create a local value numbering pass 2017-11-23 11:45:09 -05:00
common_uniform_elim_test.cpp Fixed --eliminate-common-uniform so that it does not eliminate loads of volatile variables. 2017-10-24 11:17:33 -04:00
compact_ids_test.cpp Compact-ids pass should update the header ID bound 2017-10-03 11:24:28 -04:00
dead_branch_elim_test.cpp DeadBranchElim: Add dead case elimination 2017-10-12 11:44:05 -04:00
dead_variable_elim_test.cpp Add pass to remove dead variables at the module level. 2017-10-23 13:57:05 -04:00
def_use_test.cpp Adding new def -> use mapping container 2017-11-23 16:40:02 -05:00
eliminate_dead_const_test.cpp Provide friendly names for true and false 2017-01-11 16:33:45 -05:00
eliminate_dead_functions_test.cpp Create the dead function elimination pass 2017-09-26 11:18:06 -04:00
flatten_decoration_test.cpp Add FlattenDecoration transform 2017-04-06 11:19:56 -04:00
fold_spec_const_op_composite_test.cpp Provide friendly names for true and false 2017-01-11 16:33:45 -05:00
freeze_spec_const_test.cpp Provide friendly names for true and false 2017-01-11 16:33:45 -05:00
inline_opaque_test.cpp Opt: Create InlineOpaquePass 2017-08-18 18:04:30 -04:00
inline_test.cpp Fix decorations of inlined functions. 2017-11-13 12:49:25 -05:00
insert_extract_elim_test.cpp Optimize loads/stores on nested structs 2017-11-21 17:56:03 -05:00
instruction_list_test.cpp Change the sections in the module to use the InstructionList class. 2017-10-25 15:52:06 -04:00
instruction_test.cpp Create a local value numbering pass 2017-11-23 11:45:09 -05:00
ir_context_test.cpp Adding new def -> use mapping container 2017-11-23 16:40:02 -05:00
ir_loader_test.cpp Adding an unique id to Instruction generated by IRContext 2017-11-20 17:49:10 -05:00
iterator_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
line_debug_info_test.cpp Add the IRContext (part 1) 2017-10-31 13:46:05 -04:00
local_access_chain_convert_test.cpp Allow derived access chain without uses in access chain conversion 2017-11-23 16:00:28 -05:00
local_redundancy_elimination_test.cpp Create a local value numbering pass 2017-11-23 11:45:09 -05:00
local_single_block_elim.cpp Add strength reduction; for now replace multiply by power of 2 2017-09-18 17:01:36 -04:00
local_single_store_elim_test.cpp Opt: Delete names and decorations of dead instructions 2017-07-26 18:36:41 -04:00
local_ssa_elim_test.cpp Opt: Fix HasLoads to not report decoration as load. 2017-11-07 17:39:58 -05:00
module_test.cpp Adding an unique id to Instruction generated by IRContext 2017-11-20 17:49:10 -05:00
module_utils.h Relicense SPIRV-Tools under Apache 2.0 2016-09-02 10:00:29 -04:00
optimizer_test.cpp Fix optimizer on when to write the binary 2017-04-03 15:48:50 -04:00
pass_fixture.h Adding an unique id to Instruction generated by IRContext 2017-11-20 17:49:10 -05:00
pass_manager_test.cpp Adding an unique id to Instruction generated by IRContext 2017-11-20 17:49:10 -05:00
pass_merge_return_test.cpp Initial implementation of merge return pass. 2017-11-15 10:27:04 -05:00
pass_test.cpp Adding an unique id to Instruction generated by IRContext 2017-11-20 17:49:10 -05:00
pass_utils.cpp Relicense SPIRV-Tools under Apache 2.0 2016-09-02 10:00:29 -04:00
pass_utils.h Add strength reduction; for now replace multiply by power of 2 2017-09-18 17:01:36 -04:00
set_spec_const_default_value_test.cpp Adding new def -> use mapping container 2017-11-23 16:40:02 -05:00
strength_reduction_test.cpp Tests: Add optional dependency on Effcee stateful matcher 2017-11-13 11:34:21 -05:00
strip_debug_info_test.cpp Optimizer: OpModuleProcessed is in its own layout section 2017-10-23 10:46:37 -04:00
type_manager_test.cpp Adding an unique id to Instruction generated by IRContext 2017-11-20 17:49:10 -05:00
types_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
unify_const_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
utils_test.cpp Renaming test files to comply with Google style guide. 2016-11-07 14:41:51 -05:00
value_table_test.cpp Create a local value numbering pass 2017-11-23 11:45:09 -05:00