2016-09-01 19:33:59 +00:00
|
|
|
# Copyright (c) 2016 Google Inc.
|
|
|
|
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# 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:11:24 +00:00
|
|
|
add_library(SPIRV-Tools-opt
|
2017-06-08 16:37:21 +00:00
|
|
|
aggressive_dead_code_elim_pass.h
|
2016-05-22 18:11:24 +00:00
|
|
|
basic_block.h
|
2017-06-07 21:28:53 +00:00
|
|
|
block_merge_pass.h
|
2016-09-09 18:45:18 +00:00
|
|
|
build_module.h
|
2017-12-05 16:39:25 +00:00
|
|
|
ccp_pass.h
|
2017-09-06 12:56:41 +00:00
|
|
|
cfg_cleanup_pass.h
|
2017-10-30 21:42:26 +00:00
|
|
|
cfg.h
|
2017-07-03 23:23:04 +00:00
|
|
|
common_uniform_elim_pass.h
|
2017-04-11 19:11:04 +00:00
|
|
|
compact_ids_pass.h
|
2018-01-27 00:05:33 +00:00
|
|
|
composite.h
|
2018-02-08 15:59:03 +00:00
|
|
|
const_folding_rules.h
|
2016-08-04 17:24:08 +00:00
|
|
|
constants.h
|
2017-06-02 19:23:20 +00:00
|
|
|
dead_branch_elim_pass.h
|
2018-01-27 00:05:33 +00:00
|
|
|
dead_insert_elim_pass.h
|
2017-10-23 19:48:29 +00:00
|
|
|
dead_variable_elimination.h
|
2017-07-13 00:16:51 +00:00
|
|
|
decoration_manager.h
|
2016-07-27 21:37:04 +00:00
|
|
|
def_use_manager.h
|
2017-11-27 21:21:26 +00:00
|
|
|
dominator_analysis.h
|
|
|
|
dominator_tree.h
|
2016-08-29 19:46:09 +00:00
|
|
|
eliminate_dead_constant_pass.h
|
2017-11-17 13:59:25 +00:00
|
|
|
eliminate_dead_functions_pass.h
|
2017-11-30 22:03:06 +00:00
|
|
|
feature_manager.h
|
2017-04-01 20:10:16 +00:00
|
|
|
flatten_decoration_pass.h
|
2017-10-17 23:41:37 +00:00
|
|
|
fold.h
|
2018-01-24 18:26:33 +00:00
|
|
|
folding_rules.h
|
2016-08-29 19:46:09 +00:00
|
|
|
fold_spec_constant_op_and_composite_pass.h
|
|
|
|
freeze_spec_constant_value_pass.h
|
2017-11-17 13:59:25 +00:00
|
|
|
function.h
|
2018-01-16 16:15:06 +00:00
|
|
|
if_conversion.h
|
2017-08-01 23:20:13 +00:00
|
|
|
inline_exhaustive_pass.h
|
2017-08-15 23:58:28 +00:00
|
|
|
inline_opaque_pass.h
|
2017-11-17 13:59:25 +00:00
|
|
|
inline_pass.h
|
2017-05-26 16:33:11 +00:00
|
|
|
insert_extract_elim.h
|
2016-05-22 18:11:24 +00:00
|
|
|
instruction.h
|
2018-02-08 16:03:48 +00:00
|
|
|
instruction_list.h
|
|
|
|
ir_builder.h
|
2017-10-30 15:13:24 +00:00
|
|
|
ir_context.h
|
2017-11-17 13:59:25 +00:00
|
|
|
ir_loader.h
|
2018-01-29 10:39:55 +00:00
|
|
|
licm_pass.h
|
2017-05-12 23:27:21 +00:00
|
|
|
local_access_chain_convert_pass.h
|
2017-11-11 01:26:55 +00:00
|
|
|
local_redundancy_elimination.h
|
2017-05-18 20:51:55 +00:00
|
|
|
local_single_block_elim_pass.h
|
2017-05-19 23:31:28 +00:00
|
|
|
local_single_store_elim_pass.h
|
2017-06-16 21:37:31 +00:00
|
|
|
local_ssa_elim_pass.h
|
2016-09-08 15:43:48 +00:00
|
|
|
log.h
|
2017-12-21 14:47:25 +00:00
|
|
|
loop_descriptor.h
|
2018-02-14 17:03:12 +00:00
|
|
|
loop_unroller.h
|
2018-01-26 12:07:10 +00:00
|
|
|
loop_utils.h
|
2018-02-12 21:42:15 +00:00
|
|
|
loop_unswitch_pass.h
|
2018-02-08 16:03:48 +00:00
|
|
|
make_unique.h
|
2017-11-17 13:59:25 +00:00
|
|
|
mem_pass.h
|
2017-11-08 21:22:10 +00:00
|
|
|
merge_return_pass.h
|
2016-05-22 18:11:24 +00:00
|
|
|
module.h
|
2016-08-29 19:46:09 +00:00
|
|
|
null_pass.h
|
2017-10-19 19:22:02 +00:00
|
|
|
passes.h
|
2017-11-17 13:59:25 +00:00
|
|
|
pass.h
|
2016-06-28 18:58:17 +00:00
|
|
|
pass_manager.h
|
2017-12-11 18:10:24 +00:00
|
|
|
private_to_local_pass.h
|
2017-11-17 13:59:25 +00:00
|
|
|
propagator.h
|
2017-12-04 17:29:51 +00:00
|
|
|
redundancy_elimination.h
|
2017-11-17 13:59:25 +00:00
|
|
|
reflect.h
|
2017-07-13 00:16:51 +00:00
|
|
|
remove_duplicates_pass.h
|
2018-01-30 16:24:03 +00:00
|
|
|
replace_invalid_opc.h
|
2017-11-30 22:03:06 +00:00
|
|
|
scalar_replacement_pass.h
|
2016-08-30 18:57:56 +00:00
|
|
|
set_spec_constant_default_value_pass.h
|
2018-02-02 16:55:05 +00:00
|
|
|
simplification_pass.h
|
2017-09-08 16:08:03 +00:00
|
|
|
strength_reduction_pass.h
|
2016-08-29 19:46:09 +00:00
|
|
|
strip_debug_info_pass.h
|
2017-12-04 14:36:05 +00:00
|
|
|
tree_iterator.h
|
2017-10-19 19:22:02 +00:00
|
|
|
type_manager.h
|
2017-11-17 13:59:25 +00:00
|
|
|
types.h
|
2016-08-17 21:19:48 +00:00
|
|
|
unify_const_pass.h
|
2017-11-11 01:26:55 +00:00
|
|
|
value_number_table.h
|
2018-01-17 19:57:37 +00:00
|
|
|
workaround1209.h
|
2016-05-22 18:11:24 +00:00
|
|
|
|
2017-06-08 16:37:21 +00:00
|
|
|
aggressive_dead_code_elim_pass.cpp
|
2016-11-10 17:11:50 +00:00
|
|
|
basic_block.cpp
|
2017-06-07 21:28:53 +00:00
|
|
|
block_merge_pass.cpp
|
2016-09-09 18:45:18 +00:00
|
|
|
build_module.cpp
|
2017-12-05 16:39:25 +00:00
|
|
|
ccp_pass.cpp
|
2017-09-06 12:56:41 +00:00
|
|
|
cfg_cleanup_pass.cpp
|
2017-10-30 21:42:26 +00:00
|
|
|
cfg.cpp
|
2017-07-03 23:23:04 +00:00
|
|
|
common_uniform_elim_pass.cpp
|
2017-04-11 19:11:04 +00:00
|
|
|
compact_ids_pass.cpp
|
2018-01-27 00:05:33 +00:00
|
|
|
composite.cpp
|
2018-02-08 15:59:03 +00:00
|
|
|
const_folding_rules.cpp
|
2017-12-07 21:42:27 +00:00
|
|
|
constants.cpp
|
2017-10-19 19:22:02 +00:00
|
|
|
dead_branch_elim_pass.cpp
|
2018-01-27 00:05:33 +00:00
|
|
|
dead_insert_elim_pass.cpp
|
2017-10-23 19:48:29 +00:00
|
|
|
dead_variable_elimination.cpp
|
2017-11-17 13:59:25 +00:00
|
|
|
decoration_manager.cpp
|
|
|
|
def_use_manager.cpp
|
2018-01-16 16:15:06 +00:00
|
|
|
dominator_analysis.cpp
|
2017-11-27 21:21:26 +00:00
|
|
|
dominator_tree.cpp
|
2016-08-29 19:46:09 +00:00
|
|
|
eliminate_dead_constant_pass.cpp
|
2017-11-17 13:59:25 +00:00
|
|
|
eliminate_dead_functions_pass.cpp
|
2017-11-30 22:03:06 +00:00
|
|
|
feature_manager.cpp
|
2017-04-01 20:10:16 +00:00
|
|
|
flatten_decoration_pass.cpp
|
2017-10-17 23:41:37 +00:00
|
|
|
fold.cpp
|
2018-01-24 18:26:33 +00:00
|
|
|
folding_rules.cpp
|
2016-08-29 19:46:09 +00:00
|
|
|
fold_spec_constant_op_and_composite_pass.cpp
|
|
|
|
freeze_spec_constant_value_pass.cpp
|
2017-10-17 23:41:37 +00:00
|
|
|
function.cpp
|
2018-01-16 16:15:06 +00:00
|
|
|
if_conversion.cpp
|
2017-08-01 23:20:13 +00:00
|
|
|
inline_exhaustive_pass.cpp
|
2017-08-15 23:58:28 +00:00
|
|
|
inline_opaque_pass.cpp
|
2017-11-17 13:59:25 +00:00
|
|
|
inline_pass.cpp
|
2017-05-26 16:33:11 +00:00
|
|
|
insert_extract_elim.cpp
|
2016-05-22 18:11:24 +00:00
|
|
|
instruction.cpp
|
2017-11-11 01:26:55 +00:00
|
|
|
instruction_list.cpp
|
2017-10-30 15:13:24 +00:00
|
|
|
ir_context.cpp
|
2017-11-17 13:59:25 +00:00
|
|
|
ir_loader.cpp
|
2018-01-29 10:39:55 +00:00
|
|
|
licm_pass.cpp
|
2017-05-12 23:27:21 +00:00
|
|
|
local_access_chain_convert_pass.cpp
|
2017-11-11 01:26:55 +00:00
|
|
|
local_redundancy_elimination.cpp
|
2017-05-18 20:51:55 +00:00
|
|
|
local_single_block_elim_pass.cpp
|
2017-05-19 23:31:28 +00:00
|
|
|
local_single_store_elim_pass.cpp
|
2017-06-16 21:37:31 +00:00
|
|
|
local_ssa_elim_pass.cpp
|
2017-12-21 14:47:25 +00:00
|
|
|
loop_descriptor.cpp
|
2018-01-26 12:07:10 +00:00
|
|
|
loop_utils.cpp
|
2018-02-14 17:03:12 +00:00
|
|
|
loop_unroller.cpp
|
2018-02-12 21:42:15 +00:00
|
|
|
loop_unswitch_pass.cpp
|
2017-11-17 13:59:25 +00:00
|
|
|
mem_pass.cpp
|
2017-11-08 21:22:10 +00:00
|
|
|
merge_return_pass.cpp
|
2016-05-22 18:11:24 +00:00
|
|
|
module.cpp
|
2016-09-12 18:11:46 +00:00
|
|
|
optimizer.cpp
|
2017-08-10 22:42:16 +00:00
|
|
|
pass.cpp
|
2016-09-12 16:39:44 +00:00
|
|
|
pass_manager.cpp
|
2017-12-11 18:10:24 +00:00
|
|
|
private_to_local_pass.cpp
|
2017-11-17 13:59:25 +00:00
|
|
|
propagator.cpp
|
2017-12-04 17:29:51 +00:00
|
|
|
redundancy_elimination.cpp
|
2017-11-17 13:59:25 +00:00
|
|
|
remove_duplicates_pass.cpp
|
2018-01-30 16:24:03 +00:00
|
|
|
replace_invalid_opc.cpp
|
2017-11-30 22:03:06 +00:00
|
|
|
scalar_replacement_pass.cpp
|
2017-11-17 13:59:25 +00:00
|
|
|
set_spec_constant_default_value_pass.cpp
|
2018-02-02 16:55:05 +00:00
|
|
|
simplification_pass.cpp
|
2017-09-08 16:08:03 +00:00
|
|
|
strength_reduction_pass.cpp
|
2016-08-29 19:46:09 +00:00
|
|
|
strip_debug_info_pass.cpp
|
2017-10-19 19:22:02 +00:00
|
|
|
type_manager.cpp
|
2017-11-17 13:59:25 +00:00
|
|
|
types.cpp
|
2016-08-17 21:19:48 +00:00
|
|
|
unify_const_pass.cpp
|
2017-11-11 01:26:55 +00:00
|
|
|
value_number_table.cpp
|
2018-01-17 19:57:37 +00:00
|
|
|
workaround1209.cpp
|
2017-10-30 15:13:24 +00:00
|
|
|
)
|
2016-05-22 18:11:24 +00:00
|
|
|
|
|
|
|
spvtools_default_compile_options(SPIRV-Tools-opt)
|
|
|
|
target_include_directories(SPIRV-Tools-opt
|
2016-09-16 20:12:04 +00:00
|
|
|
PUBLIC ${spirv-tools_SOURCE_DIR}/include
|
2016-05-22 18:11:24 +00:00
|
|
|
PUBLIC ${SPIRV_HEADER_INCLUDE_DIR}
|
2017-03-15 21:28:24 +00:00
|
|
|
PRIVATE ${spirv-tools_BINARY_DIR}
|
2016-05-22 18:11:24 +00:00
|
|
|
)
|
2016-09-16 20:12:04 +00:00
|
|
|
# We need the assembling and disassembling functionalities in the main library.
|
|
|
|
target_link_libraries(SPIRV-Tools-opt
|
|
|
|
PUBLIC ${SPIRV_TOOLS})
|
|
|
|
|
2017-04-05 21:32:39 +00:00
|
|
|
set_property(TARGET SPIRV-Tools-opt PROPERTY FOLDER "SPIRV-Tools libraries")
|
2017-11-22 22:03:55 +00:00
|
|
|
spvtools_check_symbol_exports(SPIRV-Tools-opt)
|
2017-04-05 21:32:39 +00:00
|
|
|
|
2017-07-04 13:11:40 +00:00
|
|
|
if(ENABLE_SPIRV_TOOLS_INSTALL)
|
|
|
|
install(TARGETS SPIRV-Tools-opt
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
endif(ENABLE_SPIRV_TOOLS_INSTALL)
|
|
|
|
|