1 # Copyright © 2018 Valve Corporation
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to deal
5 # in the Software without restriction, including without limitation the rights
6 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 # copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 aco_depends = files('aco_opcodes.py')
23 aco_opcodes_h = custom_target(
25 input : 'aco_opcodes_h.py',
26 output : 'aco_opcodes.h',
27 command : [prog_python, '@INPUT@'],
29 depend_files : aco_depends,
32 aco_opcodes_c = custom_target(
34 input : 'aco_opcodes_cpp.py',
35 output : 'aco_opcodes.cpp',
36 command : [prog_python, '@INPUT@'],
38 depend_files : aco_depends,
41 aco_builder_h = custom_target(
43 input : 'aco_builder_h.py',
44 output : 'aco_builder.h',
45 command : [prog_python, '@INPUT@'],
47 depend_files : aco_depends,
50 # Headers-only dependency
51 idep_aco_headers = declare_dependency(
52 sources : [aco_opcodes_h],
53 include_directories : include_directories('.'),
57 'aco_dead_code_analysis.cpp',
59 'aco_instruction_selection.cpp',
60 'aco_instruction_selection_setup.cpp',
65 'aco_insert_exec_mask.cpp',
66 'aco_insert_NOPs.cpp',
67 'aco_insert_waitcnt.cpp',
68 'aco_reduce_assign.cpp',
69 'aco_register_allocation.cpp',
70 'aco_live_var_analysis.cpp',
71 'aco_lower_bool_phis.cpp',
72 'aco_lower_to_cssa.cpp',
73 'aco_lower_to_hw_instr.cpp',
75 'aco_opt_value_numbering.cpp',
79 'aco_ssa_elimination.cpp',
85 _libaco = static_library(
87 [libaco_files, aco_opcodes_c, aco_opcodes_h, aco_builder_h],
88 include_directories : [
89 inc_common, inc_compiler, inc_mesa, inc_mapi, inc_amd, inc_amd_common, inc_amd_common_llvm,
95 dep_llvm, dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind,
96 idep_nir_headers, idep_amdgfxregs_h,
98 c_args : [c_vis_args],
99 cpp_args : [cpp_vis_args],
100 build_by_default : true,
104 idep_aco = declare_dependency(
105 dependencies : idep_aco_headers,