third_party_spirv-tools/source/opt
Steven Perron 53bc1623ec Fold OpDot
Adding three rules to fold OpDot (implemented as two).

- When an OpDot has two constants, then fold to the resulting const.

- When one of the inputs is the 0 vector, then fold to zero.

- When one of the inputs is a single 1 with 0s, then rewrite to an
OpCompositeExtract of the appropriate element.  This will help find
even more folding opportunities.

Contributes to #709.
2018-04-10 13:09:37 -04:00
..
aggressive_dead_code_elim_pass.cpp Optimizer: update extension whitelists 2018-04-06 15:56:20 -04:00
aggressive_dead_code_elim_pass.h Fixes #1404. Don't DCE workgroup size 2018-03-13 19:38:31 -04:00
basic_block.cpp SSA rewrite pass. 2018-03-20 20:56:55 -04:00
basic_block.h SSA rewrite pass. 2018-03-20 20:56:55 -04:00
block_merge_pass.cpp Fixes compile errors generated with -Wpedantic 2018-03-22 09:40:11 -04:00
block_merge_pass.h Remove extension whitelist from some transforms 2018-03-08 12:25:49 -05:00
build_module.cpp Fixes compile errors generated with -Wpedantic 2018-03-22 09:40:11 -04:00
build_module.h Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
ccp_pass.cpp Fixes #1361. Mark all non-constant global values as varying in CCP 2018-03-01 15:24:41 -05:00
ccp_pass.h Fix constant propagation of induction variables. 2018-01-08 15:34:35 -05:00
cfg_cleanup_pass.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
cfg_cleanup_pass.h Have all MemPasses preserve the def-use manager. 2017-11-10 11:17:12 -05:00
cfg.cpp Fixed remaining review comments from #1380 2018-03-21 16:47:01 -04:00
cfg.h Fixed remaining review comments from #1380 2018-03-21 16:47:01 -04:00
CMakeLists.txt Initial patch for scalar evolution analysis 2018-03-28 16:34:23 -04:00
common_uniform_elim_pass.cpp Optimizer: update extension whitelists 2018-04-06 15:56:20 -04:00
common_uniform_elim_pass.h Change IRContext::KillInst to delete instructions. 2017-12-04 11:07:45 -05:00
compact_ids_pass.cpp Add a new constant manager class. 2017-12-08 14:14:55 -05:00
compact_ids_pass.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
composite.cpp InsertExtractElim: Split out DeadInsertElim as separate pass 2018-01-30 08:52:14 -05:00
composite.h InsertExtractElim: Split out DeadInsertElim as separate pass 2018-01-30 08:52:14 -05:00
const_folding_rules.cpp Fold OpDot 2018-04-10 13:09:37 -04:00
const_folding_rules.h Consistently include latest spirv.h header file. 2018-02-27 18:47:29 -05:00
constants.cpp Fold OpDot 2018-04-10 13:09:37 -04:00
constants.h Fold OpDot 2018-04-10 13:09:37 -04:00
copy_prop_arrays.cpp OpName and decorations should not stop array copy prop. 2018-04-04 22:24:10 -04:00
copy_prop_arrays.h In copy-prop-arrays, indentify copies via OpCompositeInsert 2018-03-29 09:39:55 -04:00
dead_branch_elim_pass.cpp Fixes compile errors generated with -Wpedantic 2018-03-22 09:40:11 -04:00
dead_branch_elim_pass.h Remove extension whitelist from some transforms 2018-03-08 12:25:49 -05:00
dead_insert_elim_pass.cpp Fixes compile errors generated with -Wpedantic 2018-03-22 09:40:11 -04:00
dead_insert_elim_pass.h NFC: Speed up dead insert phi traversal on Windows. 2018-03-14 17:45:47 -04:00
dead_variable_elimination.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
dead_variable_elimination.h Have all MemPasses preserve the def-use manager. 2017-11-10 11:17:12 -05:00
decoration_manager.cpp Teach DecorationManager about OpDecorateStringGOOGLE 2018-03-13 22:18:33 -04:00
decoration_manager.h Reimplement the DecorationManager 2018-03-12 09:56:14 -04:00
def_use_manager.cpp Fixed remaining review comments from #1380 2018-03-21 16:47:01 -04:00
def_use_manager.h Add folding of OpCompositeExtract and OpConstantComposite constant instructions. 2018-02-09 17:52:33 -05:00
dominator_analysis.cpp Copy propagate arrays 2018-03-26 14:44:41 -04:00
dominator_analysis.h Copy propagate arrays 2018-03-26 14:44:41 -04:00
dominator_tree.cpp Fixed remaining review comments from #1380 2018-03-21 16:47:01 -04:00
dominator_tree.h Add loop unswitch pass. 2018-02-27 08:52:46 -05:00
eliminate_dead_constant_pass.cpp Change IRContext::KillInst to delete instructions. 2017-12-04 11:07:45 -05:00
eliminate_dead_constant_pass.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
eliminate_dead_functions_pass.cpp Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
eliminate_dead_functions_pass.h Have all MemPasses preserve the def-use manager. 2017-11-10 11:17:12 -05:00
feature_manager.cpp Add folding for redundant add/sub/mul/div/mix operations 2018-02-20 18:29:27 -05:00
feature_manager.h Add folding for redundant add/sub/mul/div/mix operations 2018-02-20 18:29:27 -05:00
flatten_decoration_pass.cpp Adding an unique id to Instruction generated by IRContext 2017-11-20 17:49:10 -05:00
flatten_decoration_pass.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
fold_spec_constant_op_and_composite_pass.cpp Implement SSA CCP (SSA Conditional Constant Propagation). 2017-12-21 14:29:45 -05:00
fold_spec_constant_op_and_composite_pass.h Improving the usability of the type manager. The type manager hashes 2017-12-18 08:20:56 -05:00
fold.cpp Merge arithmetic with non-trivial constant operands 2018-02-27 13:02:13 -05:00
fold.h Get CCP to use the constant floating point rules. 2018-02-16 13:49:47 -05:00
folding_rules.cpp Fold OpDot 2018-04-10 13:09:37 -04:00
folding_rules.h Add folding of OpCompositeExtract and OpConstantComposite constant instructions. 2018-02-09 17:52:33 -05:00
freeze_spec_constant_value_pass.cpp Replace calls to ToNop by KillInst. 2018-01-04 11:03:04 -05:00
freeze_spec_constant_value_pass.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
function.cpp SSA rewrite pass. 2018-03-20 20:56:55 -04:00
function.h SSA rewrite pass. 2018-03-20 20:56:55 -04:00
if_conversion.cpp Change merge return pass to handle structured cfg. 2018-03-19 13:49:04 -04:00
if_conversion.h Add id to name map 2018-02-14 15:53:13 -05:00
inline_exhaustive_pass.cpp Fixes compile errors generated with -Wpedantic 2018-03-22 09:40:11 -04:00
inline_exhaustive_pass.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
inline_opaque_pass.cpp Fixes compile errors generated with -Wpedantic 2018-03-22 09:40:11 -04:00
inline_opaque_pass.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
inline_pass.cpp Fixes compile errors generated with -Wpedantic 2018-03-22 09:40:11 -04:00
inline_pass.h Reimplement the DecorationManager 2018-03-12 09:56:14 -04:00
insert_extract_elim.cpp Fixes compile errors generated with -Wpedantic 2018-03-22 09:40:11 -04:00
insert_extract_elim.h Remove extension whitelist from some transforms 2018-03-08 12:25:49 -05:00
instruction_list.cpp Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
instruction_list.h Refactor include of latest spir-v header versions 2017-12-14 11:18:20 -05:00
instruction.cpp Teach ADCE about OpImageTexelPointer 2018-04-04 13:45:29 -04:00
instruction.h Reimplement the DecorationManager 2018-03-12 09:56:14 -04:00
ir_builder.h Copy propagate arrays 2018-03-26 14:44:41 -04:00
ir_context.cpp Initial patch for scalar evolution analysis 2018-03-28 16:34:23 -04:00
ir_context.h Initial patch for scalar evolution analysis 2018-03-28 16:34:23 -04:00
ir_loader.cpp Fixed typo that leaked to the binary 2017-12-03 20:42:14 -05:00
ir_loader.h Adding an unique id to Instruction generated by IRContext 2017-11-20 17:49:10 -05:00
iterator.h Add loop unswitch pass. 2018-02-27 08:52:46 -05:00
licm_pass.cpp Loop invariant code motion initial implementation 2018-02-08 22:55:47 -05:00
licm_pass.h Loop invariant code motion initial implementation 2018-02-08 22:55:47 -05:00
local_access_chain_convert_pass.cpp Optimizer: update extension whitelists 2018-04-06 15:56:20 -04:00
local_access_chain_convert_pass.h Change IRContext::KillInst to delete instructions. 2017-12-04 11:07:45 -05:00
local_redundancy_elimination.cpp Capturing value table by reference in local redundancy elim 2018-01-17 09:58:32 -05:00
local_redundancy_elimination.h Add id to name map 2018-02-14 15:53:13 -05:00
local_single_block_elim_pass.cpp Optimizer: update extension whitelists 2018-04-06 15:56:20 -04:00
local_single_block_elim_pass.h Re-format source tree - NFC. 2017-11-27 14:31:49 -05:00
local_single_store_elim_pass.cpp Optimizer: update extension whitelists 2018-04-06 15:56:20 -04:00
local_single_store_elim_pass.h Remove uses DCEInst and call ADCE 2018-02-27 21:06:08 -05:00
local_ssa_elim_pass.cpp Optimizer: update extension whitelists 2018-04-06 15:56:20 -04:00
local_ssa_elim_pass.h Remove uses DCEInst and call ADCE 2018-02-27 21:06:08 -05:00
log.h Avoid snprintf warning in GCC 7.1 2017-05-08 15:58:24 -04:00
loop_descriptor.cpp Add loop peeling utility 2018-03-20 10:21:10 -04:00
loop_descriptor.h Add loop unswitch pass. 2018-02-27 08:52:46 -05:00
loop_peeling.cpp Add loop peeling utility 2018-03-20 10:21:10 -04:00
loop_peeling.h Add loop peeling utility 2018-03-20 10:21:10 -04:00
loop_unroller.cpp Unroller support for multiple induction variables 2018-02-27 11:50:08 +00:00
loop_unroller.h Unroller support for multiple induction variables 2018-02-27 11:50:08 +00:00
loop_unswitch_pass.cpp Add loop peeling utility 2018-03-20 10:21:10 -04:00
loop_unswitch_pass.h Add loop unswitch pass. 2018-02-27 08:52:46 -05:00
loop_utils.cpp Add loop peeling utility 2018-03-20 10:21:10 -04:00
loop_utils.h Add loop peeling utility 2018-03-20 10:21:10 -04:00
make_unique.h Relicense SPIRV-Tools under Apache 2.0 2016-09-02 10:00:29 -04:00
mem_pass.cpp Teach ADCE about OpImageTexelPointer 2018-04-04 13:45:29 -04:00
mem_pass.h SSA rewrite pass. 2018-03-20 20:56:55 -04:00
merge_return_pass.cpp Change merge return pass to handle structured cfg. 2018-03-19 13:49:04 -04:00
merge_return_pass.h Change merge return pass to handle structured cfg. 2018-03-19 13:49:04 -04:00
module.cpp Fixes compile errors generated with -Wpedantic 2018-03-22 09:40:11 -04:00
module.h Adding ostream operators for IR structures 2018-01-12 11:19:58 -05:00
null_pass.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
optimizer.cpp In copy-prop-arrays, indentify copies via OpCompositeInsert 2018-03-29 09:39:55 -04:00
pass_manager.cpp Add --time-report to spirv-opt 2018-03-20 21:30:06 -04:00
pass_manager.h Add --time-report to spirv-opt 2018-03-20 21:30:06 -04:00
pass.cpp Add a new constant manager class. 2017-12-08 14:14:55 -05:00
pass.h SSA rewrite pass. 2018-03-20 20:56:55 -04:00
passes.h Copy propagate arrays 2018-03-26 14:44:41 -04:00
private_to_local_pass.cpp Teach the private to local about OpImageTexelPointer. 2018-04-04 13:42:35 -04:00
private_to_local_pass.h Add id to name map 2018-02-14 15:53:13 -05:00
propagator.cpp Fixes #1300. Adding checks for bad CCP transitions and unsettled values 2018-02-18 19:41:34 -05:00
propagator.h Fixes #1300. Adding checks for bad CCP transitions and unsettled values 2018-02-18 19:41:34 -05:00
redundancy_elimination.cpp Add global redundancy elimination 2017-12-07 18:35:38 -05:00
redundancy_elimination.h Add global redundancy elimination 2017-12-07 18:35:38 -05:00
reflect.h Support SPV_GOOGLE_decorate_string and SPV_GOOGLE_hlsl_functionality1 2018-03-05 13:34:13 -05:00
remove_duplicates_pass.cpp Avoid generating duplicate names when merging types 2018-03-05 12:02:50 -05:00
remove_duplicates_pass.h Linker code cleanups 2018-01-05 13:28:44 -05:00
replace_invalid_opc.cpp Add pass to reaplce invalid opcodes 2018-02-01 15:25:09 -05:00
replace_invalid_opc.h Add pass to reaplce invalid opcodes 2018-02-01 15:25:09 -05:00
scalar_analysis_nodes.h Initial patch for scalar evolution analysis 2018-03-28 16:34:23 -04:00
scalar_analysis_simplification.cpp Initial patch for scalar evolution analysis 2018-03-28 16:34:23 -04:00
scalar_analysis.cpp Initial patch for scalar evolution analysis 2018-03-28 16:34:23 -04:00
scalar_analysis.h Initial patch for scalar evolution analysis 2018-03-28 16:34:23 -04:00
scalar_replacement_pass.cpp SROA: Do replacement on structs with no partial references. 2018-02-08 15:20:02 -05:00
scalar_replacement_pass.h Add id to name map 2018-02-14 15:53:13 -05:00
set_spec_constant_default_value_pass.cpp Fixes compile errors generated with -Wpedantic 2018-03-22 09:40:11 -04:00
set_spec_constant_default_value_pass.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
simplification_pass.cpp Fold binary floating point operators. 2018-02-14 15:48:15 -05:00
simplification_pass.h Preserve analysies in the simplification pass 2018-02-22 16:06:30 -05:00
ssa_rewrite_pass.cpp Fix SSA rewrite for nested loops. 2018-04-06 15:17:52 -04:00
ssa_rewrite_pass.h Fix VS2013 build failures. 2018-03-20 21:44:17 -04:00
strength_reduction_pass.cpp Improving the usability of the type manager. The type manager hashes 2017-12-18 08:20:56 -05:00
strength_reduction_pass.h Improving the usability of the type manager. The type manager hashes 2017-12-18 08:20:56 -05:00
strip_debug_info_pass.cpp Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
strip_debug_info_pass.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
strip_reflect_info_pass.cpp Add --strip-reflect pass 2018-03-15 21:20:42 -04:00
strip_reflect_info_pass.h Add --strip-reflect pass 2018-03-15 21:20:42 -04:00
tree_iterator.h Add loop descriptors and some required dominator tree extensions. 2018-01-08 09:31:13 -05:00
type_manager.cpp Handle non-constant accesses in memory objects (copy prop arrays) 2018-03-28 20:23:47 -04:00
type_manager.h Copy propagate arrays 2018-03-26 14:44:41 -04:00
types.cpp Copy propagate arrays 2018-03-26 14:44:41 -04:00
types.h Copy propagate arrays 2018-03-26 14:44:41 -04:00
unify_const_pass.cpp Change IRContext::KillInst to delete instructions. 2017-12-04 11:07:45 -05:00
unify_const_pass.h Re-format files in source, source/opt, source/util, source/val and tools. 2017-11-08 14:03:08 -05:00
value_number_table.cpp Add global redundancy elimination 2017-12-07 18:35:38 -05:00
value_number_table.h Add global redundancy elimination 2017-12-07 18:35:38 -05:00
workaround1209.cpp Create a pass to work around a driver bug related to OpUnreachable. 2018-01-18 20:31:46 -05:00
workaround1209.h Create a pass to work around a driver bug related to OpUnreachable. 2018-01-18 20:31:46 -05:00