SPIRV-Tools/source/opt
Steven Perron 0bc66a8ba9
Fix invalid OpPhi generated by merge-return. (#2172)
* Fix invalid OpPhi generated by merge-return.

When we create a new phi node for a value say %10, we have to replace
all of the uses of %10 that are no longer dominated by the def of %10
by the result id of the new phi.  However, if the use is in a phi node,
it is possible that the bb contains the use is not dominated by either.
In this case, needs to be handled differently.

* Split loop headers before add a new branch to them.

In merge return, Phi node in loop header that are also merges for loop
do not get updated correctly.  Those cases do not fit in with our
current analysis.  Doing this will simplify the code by reducing the
number of cases that have to be handled.
2018-12-07 14:10:30 -05:00
..
aggressive_dead_code_elim_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
aggressive_dead_code_elim_pass.h Fix ADCE liveness to include all enclosing control structures. (#1975) 2018-10-16 08:00:07 -04:00
basic_block.cpp Keep analyses live in unrolling (#1929) 2018-09-26 17:36:27 -04:00
basic_block.h Add base and core bindless validation instrumentation classes (#2014) 2018-11-08 13:54:54 -05:00
block_merge_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
block_merge_pass.h Analyze uses for all instructions. (#1937) 2018-09-28 14:39:06 -04:00
build_module.cpp Move make_unique to source/util. (#1836) 2018-08-14 12:44:54 -04:00
build_module.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
ccp_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
ccp_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
cfg_cleanup_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
cfg_cleanup_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
cfg.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
cfg.h Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
CMakeLists.txt Update memory model (#1904) 2018-11-30 14:15:51 -05:00
combine_access_chains.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
combine_access_chains.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
common_uniform_elim_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
common_uniform_elim_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
compact_ids_pass.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
compact_ids_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
composite.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
composite.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
const_folding_rules.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
const_folding_rules.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
constants.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
constants.h Have the constant manager take ownership of constants. (#1866) 2018-08-27 09:53:47 -04:00
copy_prop_arrays.cpp Add a nullptr check to array copy propagation. (#1987) 2018-10-19 12:53:40 -04:00
copy_prop_arrays.h Fix erroneous uses of the type manager in copy-prop-arrays. (#1942) 2018-10-01 14:45:44 -04:00
dead_branch_elim_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
dead_branch_elim_pass.h Fix dead branch elim infinite loop. (#2009) 2018-10-24 09:10:30 -04:00
dead_insert_elim_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
dead_insert_elim_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
dead_variable_elimination.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
dead_variable_elimination.h Add testing framework for tools. 2018-08-17 15:03:14 -04:00
decoration_manager.cpp Add base and core bindless validation instrumentation classes (#2014) 2018-11-08 13:54:54 -05:00
decoration_manager.h Add base and core bindless validation instrumentation classes (#2014) 2018-11-08 13:54:54 -05:00
def_use_manager.cpp Add base and core bindless validation instrumentation classes (#2014) 2018-11-08 13:54:54 -05:00
def_use_manager.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
dominator_analysis.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
dominator_analysis.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
dominator_tree.cpp Fix readbility/braces warnings (#1804) 2018-08-07 09:09:47 -04:00
dominator_tree.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
eliminate_dead_constant_pass.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
eliminate_dead_constant_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
eliminate_dead_functions_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
eliminate_dead_functions_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
feature_manager.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
feature_manager.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
flatten_decoration_pass.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
flatten_decoration_pass.h Add testing framework for tools. 2018-08-17 15:03:14 -04:00
fold_spec_constant_op_and_composite_pass.cpp Have the constant manager take ownership of constants. (#1866) 2018-08-27 09:53:47 -04:00
fold_spec_constant_op_and_composite_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
fold.cpp Remove undefined behaviour when folding shifts. (#2157) 2018-12-04 10:04:02 -05:00
fold.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
folding_rules.cpp Fix folding of volatile store. (#2048) 2018-11-14 13:52:18 -05:00
folding_rules.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
freeze_spec_constant_value_pass.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
freeze_spec_constant_value_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
function.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
function.h Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
if_conversion.cpp Fix restrictions in if conversion (#1998) 2018-10-19 15:16:46 -04:00
if_conversion.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
inline_exhaustive_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
inline_exhaustive_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
inline_opaque_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
inline_opaque_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
inline_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
inline_pass.h Don't assume one return means function can be inlined. (#2018) (#2025) 2018-11-08 09:11:20 -05:00
inst_bindless_check_pass.cpp Add base and core bindless validation instrumentation classes (#2014) 2018-11-08 13:54:54 -05:00
inst_bindless_check_pass.h Add missing overrides (#2041) 2018-11-12 15:11:32 -05:00
instruction_list.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
instruction_list.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
instruction.cpp Fix Instruction::IsFloatingPointFoldingAllowed() 2018-11-14 15:25:51 -07:00
instruction.h New spirv-reduce reduction pass: operand to dominating id. (#2099) 2018-11-26 17:06:21 -05:00
instrument_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
instrument_pass.h Add missing overrides (#2041) 2018-11-12 15:11:32 -05:00
ir_builder.h Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
ir_context.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
ir_context.h Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
ir_loader.cpp Use MakeUnique. (#1837) 2018-08-14 15:01:50 -04:00
ir_loader.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
iterator.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
licm_pass.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
licm_pass.h Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
local_access_chain_convert_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
local_access_chain_convert_pass.h Keep decorations when replacing loads in access-chain-convert. (#1829) 2018-08-15 09:14:21 -04:00
local_redundancy_elimination.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
local_redundancy_elimination.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
local_single_block_elim_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
local_single_block_elim_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
local_single_store_elim_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
local_single_store_elim_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
local_ssa_elim_pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
local_ssa_elim_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
log.h Rewrite include guards (#1793) 2018-08-03 08:05:33 -04:00
loop_dependence_helpers.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
loop_dependence.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
loop_dependence.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
loop_descriptor.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
loop_descriptor.h Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
loop_fission.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
loop_fission.h Add testing framework for tools. 2018-08-17 15:03:14 -04:00
loop_fusion_pass.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
loop_fusion_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
loop_fusion.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
loop_fusion.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
loop_peeling.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
loop_peeling.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
loop_unroller.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
loop_unroller.h Keep analyses live in unrolling (#1929) 2018-09-26 17:36:27 -04:00
loop_unswitch_pass.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
loop_unswitch_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
loop_utils.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
loop_utils.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
mem_pass.cpp Consider atomics that load when analyzing live stores in ADCE (#1956) (#1958) 2018-10-12 08:46:35 -04:00
mem_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
merge_return_pass.cpp Fix invalid OpPhi generated by merge-return. (#2172) 2018-12-07 14:10:30 -05:00
merge_return_pass.h Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
module.cpp Add option for the max id bound. (#1870) 2018-09-10 11:49:41 -04:00
module.h Add option for the max id bound. (#1870) 2018-09-10 11:49:41 -04:00
null_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
optimizer.cpp Update memory model (#1904) 2018-11-30 14:15:51 -05:00
pass_manager.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
pass_manager.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
pass.cpp Don't inline recursive functions. (#2130) 2018-11-29 14:24:58 -05:00
pass.h Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
passes.h Update memory model (#1904) 2018-11-30 14:15:51 -05:00
pch_source_opt.cpp Enable precompiled headers for spirv-tools(-shared) and some unit tests (#2026) 2018-11-06 09:26:23 -05:00
pch_source_opt.h Enable precompiled headers for spirv-tools(-shared) and some unit tests (#2026) 2018-11-06 09:26:23 -05:00
private_to_local_pass.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
private_to_local_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
process_lines_pass.cpp Add passes to propagate and eliminate redundant line instructions (#2027). (#2039) 2018-11-15 14:06:17 -05:00
process_lines_pass.h Add missing override to ProcessLinesPass 2018-11-19 19:24:48 -05:00
propagator.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
propagator.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
reduce_load_size.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
reduce_load_size.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
redundancy_elimination.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
redundancy_elimination.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
reflect.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
register_pressure.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
register_pressure.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
remove_duplicates_pass.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
remove_duplicates_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
replace_invalid_opc.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
replace_invalid_opc.h Add testing framework for tools. 2018-08-17 15:03:14 -04:00
scalar_analysis_nodes.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
scalar_analysis_simplification.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
scalar_analysis.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
scalar_analysis.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
scalar_replacement_pass.cpp Don't scalarize spec constant sized arrays 2018-10-04 11:58:23 -04:00
scalar_replacement_pass.h Don't scalarize spec constant sized arrays 2018-10-04 11:58:23 -04:00
set_spec_constant_default_value_pass.cpp Move make_unique to source/util. (#1836) 2018-08-14 12:44:54 -04:00
set_spec_constant_default_value_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
simplification_pass.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
simplification_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
ssa_rewrite_pass.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
ssa_rewrite_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
strength_reduction_pass.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
strength_reduction_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
strip_debug_info_pass.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
strip_debug_info_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
strip_reflect_info_pass.cpp Remove MemberDecorateStringGOOGLE during stript-refect. (#2021) 2018-10-30 16:17:35 -04:00
strip_reflect_info_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
struct_cfg_analysis.cpp Check for unreachable blocks in merge-return. (#1966) 2018-10-10 15:18:15 -04:00
struct_cfg_analysis.h Check for unreachable blocks in merge-return. (#1966) 2018-10-10 15:18:15 -04:00
tree_iterator.h Rewrite include guards (#1793) 2018-08-03 08:05:33 -04:00
type_manager.cpp Document in the context what happens with id overflow. (#2159) 2018-12-06 09:07:00 -05:00
type_manager.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
types.cpp Don't assert on void function parameters. (#2047) 2018-11-14 12:43:43 -05:00
types.h Add base and core bindless validation instrumentation classes (#2014) 2018-11-08 13:54:54 -05:00
unify_const_pass.cpp Move make_unique to source/util. (#1836) 2018-08-14 12:44:54 -04:00
unify_const_pass.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
upgrade_memory_model.cpp Update memory model (#1904) 2018-11-30 14:15:51 -05:00
upgrade_memory_model.h Update memory model (#1904) 2018-11-30 14:15:51 -05:00
value_number_table.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
value_number_table.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
vector_dce.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
vector_dce.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
workaround1209.cpp Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00
workaround1209.h Cleanup includes. (#1795) 2018-08-03 15:06:09 -04:00