2016-05-22 18:17:39 +00:00
|
|
|
# Copyright (c) 2016 Google Inc.
|
|
|
|
#
|
2016-09-01 19:33:59 +00:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
2016-05-22 18:17:39 +00:00
|
|
|
#
|
2016-09-01 19:33:59 +00:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2016-05-22 18:17:39 +00:00
|
|
|
#
|
2016-09-01 19:33:59 +00:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
2016-05-22 18:17:39 +00:00
|
|
|
|
2017-11-27 21:21:26 +00:00
|
|
|
add_subdirectory(dominator_tree)
|
2017-12-21 14:47:25 +00:00
|
|
|
add_subdirectory(loop_optimizations)
|
2017-11-27 21:21:26 +00:00
|
|
|
|
2018-11-01 14:19:37 +00:00
|
|
|
add_spvtools_unittest(TARGET opt
|
|
|
|
SRCS aggressive_dead_code_elim_test.cpp
|
2019-08-29 16:48:17 +00:00
|
|
|
amd_ext_to_khr.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
assembly_builder_test.cpp
|
|
|
|
block_merge_test.cpp
|
|
|
|
ccp_test.cpp
|
|
|
|
cfg_cleanup_test.cpp
|
2019-04-29 21:09:20 +00:00
|
|
|
cfg_test.cpp
|
2019-01-17 20:56:36 +00:00
|
|
|
code_sink_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
combine_access_chains_test.cpp
|
|
|
|
compact_ids_test.cpp
|
2019-07-30 23:52:46 +00:00
|
|
|
constants_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
constant_manager_test.cpp
|
2021-07-28 16:44:32 +00:00
|
|
|
control_dependence.cpp
|
2019-09-03 17:22:13 +00:00
|
|
|
convert_relaxed_to_half_test.cpp
|
2021-08-18 12:30:48 +00:00
|
|
|
convert_to_sampled_image_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
copy_prop_array_test.cpp
|
2021-08-09 20:43:36 +00:00
|
|
|
dataflow.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
dead_branch_elim_test.cpp
|
|
|
|
dead_insert_elim_test.cpp
|
|
|
|
dead_variable_elim_test.cpp
|
2020-04-27 19:18:55 +00:00
|
|
|
debug_info_manager_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
decoration_manager_test.cpp
|
|
|
|
def_use_test.cpp
|
2019-08-08 14:53:19 +00:00
|
|
|
desc_sroa_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
eliminate_dead_const_test.cpp
|
|
|
|
eliminate_dead_functions_test.cpp
|
2019-02-14 18:42:35 +00:00
|
|
|
eliminate_dead_member_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
feature_manager_test.cpp
|
2019-04-05 17:12:08 +00:00
|
|
|
fix_storage_class_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
flatten_decoration_test.cpp
|
|
|
|
fold_spec_const_op_composite_test.cpp
|
|
|
|
fold_test.cpp
|
|
|
|
freeze_spec_const_test.cpp
|
2018-11-29 19:24:58 +00:00
|
|
|
function_test.cpp
|
2019-07-30 23:52:46 +00:00
|
|
|
graphics_robust_access_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
if_conversion_test.cpp
|
|
|
|
inline_opaque_test.cpp
|
|
|
|
inline_test.cpp
|
|
|
|
insert_extract_elim_test.cpp
|
2018-11-08 18:54:54 +00:00
|
|
|
inst_bindless_check_test.cpp
|
2019-08-16 13:18:34 +00:00
|
|
|
inst_buff_addr_check_test.cpp
|
2020-03-12 13:19:52 +00:00
|
|
|
inst_debug_printf_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
instruction_list_test.cpp
|
|
|
|
instruction_test.cpp
|
2021-03-31 18:26:36 +00:00
|
|
|
interp_fixup_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
ir_builder.cpp
|
|
|
|
ir_context_test.cpp
|
|
|
|
ir_loader_test.cpp
|
|
|
|
iterator_test.cpp
|
|
|
|
line_debug_info_test.cpp
|
|
|
|
local_access_chain_convert_test.cpp
|
|
|
|
local_redundancy_elimination_test.cpp
|
|
|
|
local_single_block_elim.cpp
|
|
|
|
local_single_store_elim_test.cpp
|
|
|
|
local_ssa_elim_test.cpp
|
2016-09-22 15:05:30 +00:00
|
|
|
module_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
module_utils.h
|
|
|
|
optimizer_test.cpp
|
|
|
|
pass_manager_test.cpp
|
|
|
|
pass_merge_return_test.cpp
|
|
|
|
pass_remove_duplicates_test.cpp
|
|
|
|
pass_utils.cpp
|
|
|
|
private_to_local_test.cpp
|
|
|
|
propagator_test.cpp
|
|
|
|
reduce_load_size_test.cpp
|
|
|
|
redundancy_elimination_test.cpp
|
2021-06-29 15:33:58 +00:00
|
|
|
remove_unused_interface_variables_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
register_liveness.cpp
|
2019-09-03 17:22:13 +00:00
|
|
|
relax_float_ops_test.cpp
|
2021-10-26 21:20:58 +00:00
|
|
|
replace_desc_array_access_using_var_index_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
replace_invalid_opc_test.cpp
|
|
|
|
scalar_analysis.cpp
|
|
|
|
scalar_replacement_test.cpp
|
|
|
|
set_spec_const_default_value_test.cpp
|
|
|
|
simplification_test.cpp
|
spirv-opt: add pass to Spread Volatile semantics (#4667)
Add a pass to spread Volatile semantics to variables with SMIDNV,
WarpIDNV, SubgroupSize, SubgroupLocalInvocationId, SubgroupEqMask,
SubgroupGeMask, SubgroupGtMask, SubgroupLeMask, or SubgroupLtMask BuiltIn
decorations or OpLoad for them when the shader model is the ray
generation, closest hit, miss, intersection, or callable shaders. This
pass can be used for VUID-StandaloneSpirv-VulkanMemoryModel-04678 and
VUID-StandaloneSpirv-VulkanMemoryModel-04679 (See "Standalone SPIR-V
Validation" section of Vulkan spec "Appendix A: Vulkan Environment for
SPIR-V").
Handle variables used by multiple entry points:
1. Update error check to make it working regardless of the order of
entry points.
2. For a variable, if it is used by two entry points E1 and E2 and
it needs the Volatile semantics for E1 while it does not for E2
- If VulkanMemoryModel capability is enabled, which means we have to
set memory operation of load instructions for the variable, we
update load instructions in E1, but do not update the ones in E2.
- If VulkanMemoryModel capability is disabled, which means we have
to add Volatile decoration for the variable, we report an error
because E1 needs to add Volatile decoration for the variable while
E2 does not.
For the simplicity of the implementation, we assume that all functions
other than entry point functions are inlined.
2022-01-25 18:14:36 +00:00
|
|
|
spread_volatile_semantics_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
strength_reduction_test.cpp
|
|
|
|
strip_debug_info_test.cpp
|
2021-12-15 14:55:30 +00:00
|
|
|
strip_nonsemantic_info_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
struct_cfg_analysis_test.cpp
|
|
|
|
type_manager_test.cpp
|
|
|
|
types_test.cpp
|
|
|
|
unify_const_test.cpp
|
2019-01-07 17:36:38 +00:00
|
|
|
upgrade_memory_model_test.cpp
|
2018-11-01 14:19:37 +00:00
|
|
|
utils_test.cpp pass_utils.cpp
|
|
|
|
value_table_test.cpp
|
|
|
|
vector_dce_test.cpp
|
|
|
|
workaround1209_test.cpp
|
2019-08-14 13:27:12 +00:00
|
|
|
wrap_opkill_test.cpp
|
2016-09-16 20:12:04 +00:00
|
|
|
LIBS SPIRV-Tools-opt
|
2018-11-07 14:15:04 +00:00
|
|
|
PCH_FILE pch_test_opt
|
2016-08-20 09:51:15 +00:00
|
|
|
)
|