SPIRV-Tools/source/opt
Steven Perron 208921efe8 Fix finding constant with particular type. (#1724)
With current implementation, the constant manager does not keep around
two constant with the same value but different types when the types
hash to the same value. So when you start looking for that constant you
will get a constant with the wrong type back.

I've made a few changes to the constant manager to fix this.  First off,
I have changed the map from constant to ids to be an std::multimap.
This way a single constant can be mapped to mutiple ids each
representing a different type.

Then when asking for an id of a constant, we can search all of the ids
associated with that constant in order to find the one with the correct
type.
2018-07-16 12:36:53 -04:00
..
aggressive_dead_code_elim_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
aggressive_dead_code_elim_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
basic_block.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
basic_block.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
block_merge_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
block_merge_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
build_module.cpp Move the ir namespace to opt. (#1680) 2018-07-09 11:32:29 -04:00
build_module.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
ccp_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
ccp_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
cfg_cleanup_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
cfg_cleanup_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
cfg.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
cfg.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
CMakeLists.txt Delete the insert-extract-elim pass. 2018-06-01 10:13:39 -04:00
common_uniform_elim_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
common_uniform_elim_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
compact_ids_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
compact_ids_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
composite.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
composite.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
const_folding_rules.cpp Fix finding constant with particular type. (#1724) 2018-07-16 12:36:53 -04:00
const_folding_rules.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
constants.cpp Fix finding constant with particular type. (#1724) 2018-07-16 12:36:53 -04:00
constants.h Fix finding constant with particular type. (#1724) 2018-07-16 12:36:53 -04:00
copy_prop_arrays.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
copy_prop_arrays.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
dead_branch_elim_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
dead_branch_elim_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
dead_insert_elim_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
dead_insert_elim_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
dead_variable_elimination.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
dead_variable_elimination.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
decoration_manager.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
decoration_manager.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
def_use_manager.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
def_use_manager.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
dominator_analysis.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
dominator_analysis.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
dominator_tree.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
dominator_tree.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
eliminate_dead_constant_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
eliminate_dead_constant_pass.h use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00
eliminate_dead_functions_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
eliminate_dead_functions_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
feature_manager.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
feature_manager.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
flatten_decoration_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
flatten_decoration_pass.h use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00
fold_spec_constant_op_and_composite_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
fold_spec_constant_op_and_composite_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
fold.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
fold.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
folding_rules.cpp Fix infinite loop while folding OpVectorShuffle (#1722) 2018-07-13 12:43:00 -04:00
folding_rules.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
freeze_spec_constant_value_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
freeze_spec_constant_value_pass.h use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00
function.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
function.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
if_conversion.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
if_conversion.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
inline_exhaustive_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
inline_exhaustive_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
inline_opaque_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
inline_opaque_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
inline_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
inline_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
instruction_list.cpp Move the ir namespace to opt. (#1680) 2018-07-09 11:32:29 -04:00
instruction_list.h Move the ir namespace to opt. (#1680) 2018-07-09 11:32:29 -04:00
instruction.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
instruction.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
ir_builder.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
ir_context.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
ir_context.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
ir_loader.cpp Remove the module from opt::Function. (#1717) 2018-07-12 14:42:05 -04:00
ir_loader.h Move the ir namespace to opt. (#1680) 2018-07-09 11:32:29 -04:00
iterator.h Move the ir namespace to opt. (#1680) 2018-07-09 11:32:29 -04:00
licm_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
licm_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
local_access_chain_convert_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
local_access_chain_convert_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
local_redundancy_elimination.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
local_redundancy_elimination.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
local_single_block_elim_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
local_single_block_elim_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
local_single_store_elim_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
local_single_store_elim_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
local_ssa_elim_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
local_ssa_elim_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
log.h Avoid snprintf warning in GCC 7.1 2017-05-08 15:58:24 -04:00
loop_dependence_helpers.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_dependence.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_dependence.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_descriptor.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_descriptor.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_fission.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_fission.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_fusion_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_fusion_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_fusion.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_fusion.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_peeling.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_peeling.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_unroller.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_unroller.h use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00
loop_unswitch_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_unswitch_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_utils.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
loop_utils.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
make_unique.h Relicense SPIRV-Tools under Apache 2.0 2016-09-02 10:00:29 -04:00
mem_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
mem_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
merge_return_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
merge_return_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
module.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
module.h Move the ir namespace to opt. (#1680) 2018-07-09 11:32:29 -04:00
null_pass.h use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00
optimizer.cpp Move the ir namespace to opt. (#1680) 2018-07-09 11:32:29 -04:00
pass_manager.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
pass_manager.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
passes.h Delete the insert-extract-elim pass. 2018-06-01 10:13:39 -04:00
private_to_local_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
private_to_local_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
propagator.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
propagator.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
reduce_load_size.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
reduce_load_size.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
redundancy_elimination.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
redundancy_elimination.h use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00
reflect.h Move the ir namespace to opt. (#1680) 2018-07-09 11:32:29 -04:00
register_pressure.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
register_pressure.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
remove_duplicates_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
remove_duplicates_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
replace_invalid_opc.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
replace_invalid_opc.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
scalar_analysis_nodes.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
scalar_analysis_simplification.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
scalar_analysis.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
scalar_analysis.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
scalar_replacement_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
scalar_replacement_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
set_spec_constant_default_value_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
set_spec_constant_default_value_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
simplification_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
simplification_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
ssa_rewrite_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
ssa_rewrite_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
strength_reduction_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
strength_reduction_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
strip_debug_info_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
strip_debug_info_pass.h use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00
strip_reflect_info_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
strip_reflect_info_pass.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -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 Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
type_manager.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
types.cpp Handle types with self references. 2018-05-30 15:48:38 -04:00
types.h Handle types with self references. 2018-05-30 15:48:38 -04:00
unify_const_pass.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
unify_const_pass.h use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00
value_number_table.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
value_number_table.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
vector_dce.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
vector_dce.h Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
workaround1209.cpp Cleanup extraneous namespace qualifies in source/opt. (#1716) 2018-07-12 15:14:43 -04:00
workaround1209.h use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00