SPIRV-Tools/test/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
..
dominator_tree Remove context() method from opt::Function (#1700) 2018-07-12 10:16:15 -04:00
loop_optimizations Remove the module from opt::Function. (#1717) 2018-07-12 14:42:05 -04:00
aggressive_dead_code_elim_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
assembly_builder_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
assembly_builder.h Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
block_merge_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
ccp_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
cfg_cleanup_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
CMakeLists.txt Make sure the constant folder get the correct type. 2018-07-05 14:34:30 -04:00
common_uniform_elim_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
compact_ids_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
constant_manager_test.cpp Fix finding constant with particular type. (#1724) 2018-07-16 12:36:53 -04:00
copy_prop_array_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
dead_branch_elim_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
dead_insert_elim_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
dead_variable_elim_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
decoration_manager_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
def_use_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
eliminate_dead_const_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
eliminate_dead_functions_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
feature_manager_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
flatten_decoration_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
fold_spec_const_op_composite_test.cpp Fix finding constant with particular type. (#1724) 2018-07-16 12:36:53 -04:00
fold_test.cpp Fix finding constant with particular type. (#1724) 2018-07-16 12:36:53 -04:00
freeze_spec_const_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
function_utils.h Move the ir namespace to opt. (#1680) 2018-07-09 11:32:29 -04:00
if_conversion_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
inline_opaque_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
inline_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
insert_extract_elim_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
instruction_list_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
instruction_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
ir_builder.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
ir_context_test.cpp use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00
ir_loader_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
iterator_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
line_debug_info_test.cpp use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00
local_access_chain_convert_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
local_redundancy_elimination_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
local_single_block_elim.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
local_single_store_elim_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
local_ssa_elim_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
module_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
module_utils.h Move the ir namespace to opt. (#1680) 2018-07-09 11:32:29 -04:00
optimizer_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
pass_fixture.h Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
pass_manager_test.cpp use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00
pass_merge_return_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
pass_remove_duplicates_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
pass_test.cpp use Pass::Run to set the context on each pass. (#1708) 2018-07-12 09:08:45 -04:00
pass_utils.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
pass_utils.h Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
private_to_local_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
propagator_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
reduce_load_size_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
redundancy_elimination_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
register_liveness.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
replace_invalid_opc_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
scalar_analysis.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
scalar_replacement_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
set_spec_const_default_value_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
simplification_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
strength_reduction_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
strip_debug_info_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
strip_reflect_info_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
type_manager_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
types_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
unify_const_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
utils_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
value_table_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
vector_dce_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00
workaround1209_test.cpp Move tests into namespaces (#1689) 2018-07-11 09:24:49 -04:00