SPIRV-Tools/source/opt
GregF 9de4e69856 Add AggressiveDCEPass
Create aggressive dead code elimination pass
This pass eliminates unused code from functions. In addition,
it detects and eliminates code which may have spurious uses but which do
not contribute to the output of the function. The most common cause of
such code sequences is summations in loops whose result is no longer used
due to dead code elimination. This optimization has additional compile
time cost over standard dead code elimination.

This pass only processes entry point functions. It also only processes
shaders with logical addressing. It currently will not process functions
with function calls. It currently only supports the GLSL.std.450 extended
instruction set. It currently does not support any extensions.

This pass will be made more effective by first running passes that remove
dead control flow and inlines function calls.

This pass can be especially useful after running Local Access Chain
Conversion, which tends to cause cycles of dead code to be left after
Store/Load elimination passes are completed. These cycles cannot be
eliminated with standard dead code elimination.

Additionally: This transform uses a whitelist of instructions that it
knows do have side effects, (a.k.a. combinators).  It assumes other
instructions have side effects: it will not remove them, and assumes
they have side effects via their ID operands.
2017-07-10 11:30:25 -04:00
..
aggressive_dead_code_elim_pass.cpp Add AggressiveDCEPass 2017-07-10 11:30:25 -04:00
aggressive_dead_code_elim_pass.h Add AggressiveDCEPass 2017-07-10 11:30:25 -04:00
basic_block.cpp Add exhaustive function call inlining to spirv-opt 2017-03-29 18:02:40 -04:00
basic_block.h BlockMerge: Add BlockMergePass 2017-06-27 11:31:33 -04:00
block_merge_pass.cpp BlockMerge: Add BlockMergePass 2017-06-27 11:31:33 -04:00
block_merge_pass.h BlockMerge: Add BlockMergePass 2017-06-27 11:31:33 -04:00
build_module.cpp Added --compact-ids to /tools/opt 2017-04-20 10:54:39 -04:00
build_module.h Added --compact-ids to /tools/opt 2017-04-20 10:54:39 -04:00
CMakeLists.txt Add AggressiveDCEPass 2017-07-10 11:30:25 -04:00
compact_ids_pass.cpp Added --compact-ids to /tools/opt 2017-04-20 10:54:39 -04:00
compact_ids_pass.h Added --compact-ids to /tools/opt 2017-04-20 10:54:39 -04:00
constants.h Clean up header dependency. 2016-09-22 18:15:23 -04:00
dead_branch_elim_pass.cpp DeadBranchElim: Add DeadBranchElimPass 2017-07-07 15:16:25 -04:00
dead_branch_elim_pass.h DeadBranchElim: Add DeadBranchElimPass 2017-07-07 15:16:25 -04:00
def_use_manager.cpp Add LocalMultiStoreElim pass 2017-07-07 17:54:21 -04:00
def_use_manager.h Add LocalMultiStoreElim pass 2017-07-07 17:54:21 -04:00
eliminate_dead_constant_pass.cpp Change interface of Pass::Process() to return possible failures. 2016-09-20 16:40:17 -04:00
eliminate_dead_constant_pass.h Add a C++ interface to the optimization functionalities. 2016-09-20 16:52:05 -04:00
flatten_decoration_pass.cpp Add FlattenDecoration transform 2017-04-06 11:19:56 -04:00
flatten_decoration_pass.h Add FlattenDecoration transform 2017-04-06 11:19:56 -04:00
fold_spec_constant_op_and_composite_pass.cpp Clean up header dependency. 2016-09-22 18:15:23 -04:00
fold_spec_constant_op_and_composite_pass.h Clean up header dependency. 2016-09-22 18:15:23 -04:00
freeze_spec_constant_value_pass.cpp Change interface of Pass::Process() to return possible failures. 2016-09-20 16:40:17 -04:00
freeze_spec_constant_value_pass.h Add a C++ interface to the optimization functionalities. 2016-09-20 16:52:05 -04:00
function.cpp Add exhaustive function call inlining to spirv-opt 2017-03-29 18:02:40 -04:00
function.h Inline: Inline early return function if no returns in loop. 2017-05-12 17:18:00 -04:00
inline_pass.cpp Transform multiple entry points 2017-06-20 15:57:47 -04:00
inline_pass.h Inline: Inline early return function if no returns in loop. 2017-05-12 17:18:00 -04:00
insert_extract_elim.cpp mem2reg: Add InsertExtractElimPass 2017-06-21 08:13:15 -04:00
insert_extract_elim.h mem2reg: Add InsertExtractElimPass 2017-06-21 08:13:15 -04:00
instruction.cpp Clean up header dependency. 2016-09-22 18:15:23 -04:00
instruction.h Include memory and semantics IDs when iterating over inbound IDs 2017-07-05 10:36:57 -04:00
ir_loader.cpp Change some asserts to normal errors in IrLoader. 2016-09-21 17:22:00 -04:00
ir_loader.h Clean up header dependency. 2016-09-22 18:15:23 -04:00
iterator.h Add exhaustive function call inlining to spirv-opt 2017-03-29 18:02:40 -04:00
local_access_chain_convert_pass.cpp Transform multiple entry points 2017-06-20 15:57:47 -04:00
local_access_chain_convert_pass.h Mem2Reg: Add Local Access Chain Convert pass 2017-06-04 12:49:27 -04:00
local_single_block_elim_pass.cpp Transform multiple entry points 2017-06-20 15:57:47 -04:00
local_single_block_elim_pass.h mem2reg: Add pass to eliminate local loads and stores in single block. 2017-06-12 17:03:47 -04:00
local_single_store_elim_pass.cpp Transform multiple entry points 2017-06-20 15:57:47 -04:00
local_single_store_elim_pass.h mem2reg: Add LocalSingleStoreElimPass 2017-06-19 10:43:02 -04:00
local_ssa_elim_pass.cpp Add LocalMultiStoreElim pass 2017-07-07 17:54:21 -04:00
local_ssa_elim_pass.h Add LocalMultiStoreElim pass 2017-07-07 17:54:21 -04:00
log.h Avoid snprintf warning in GCC 7.1 2017-05-08 15:58:24 -04:00
make_unique.h Relicense SPIRV-Tools under Apache 2.0 2016-09-02 10:00:29 -04:00
module.cpp Add AggressiveDCEPass 2017-07-10 11:30:25 -04:00
module.h Add AggressiveDCEPass 2017-07-10 11:30:25 -04:00
null_pass.h Add a C++ interface to the optimization functionalities. 2016-09-20 16:52:05 -04:00
optimizer.cpp Add AggressiveDCEPass 2017-07-10 11:30:25 -04:00
pass_manager.cpp Change interface of Pass::Process() to return possible failures. 2016-09-20 16:40:17 -04:00
pass_manager.h Clean up header dependency. 2016-09-22 18:15:23 -04:00
pass.h Add a default virtual dtor to Pass and check for missing virtual dtors 2017-03-01 13:34:04 -05:00
passes.h Add AggressiveDCEPass 2017-07-10 11:30:25 -04:00
reflect.h Add SPIR-V 1.2 support, for OpenCL 2.2 2017-05-15 17:10:07 -04:00
set_spec_constant_default_value_pass.cpp Add bit pattern interface for setting default value for spec constants 2017-04-21 11:22:47 -04:00
set_spec_constant_default_value_pass.h Add bit pattern interface for setting default value for spec constants 2017-04-21 11:22:47 -04:00
strip_debug_info_pass.cpp Change interface of Pass::Process() to return possible failures. 2016-09-20 16:40:17 -04:00
strip_debug_info_pass.h Add a C++ interface to the optimization functionalities. 2016-09-20 16:52:05 -04:00
type_manager.cpp Fix typo in method name Struct::AddMemberName 2017-04-01 11:19:40 -04:00
type_manager.h Add begin() and end() for TypeManager. 2016-09-30 16:56:42 -04:00
types.cpp Fix typo in method name Struct::AddMemberName 2017-04-01 11:19:40 -04:00
types.h Add SPIR-V 1.2 support, for OpenCL 2.2 2017-05-15 17:10:07 -04:00
unify_const_pass.cpp Change interface of Pass::Process() to return possible failures. 2016-09-20 16:40:17 -04:00
unify_const_pass.h Add a C++ interface to the optimization functionalities. 2016-09-20 16:52:05 -04:00