Debian Codegraph @

src/panfrost/compiler/bifrost/meson.build

raw
1 # Copyright © 2018 Rob Clark
2 # Copyright © 2019 Collabora
3 # SPDX-License-Identifier: MIT
4
5 subdir('valhall')
6
7 inc_valhall = include_directories(['.', 'valhall'])
8
9 libpanfrost_bifrost_files = files(
10 'bi_helper_invocations.c',
11 'bi_layout.c',
12 'bi_liveness.c',
13 'bi_lower_divergent_indirects.c',
14 'bi_lower_mkvec_swz.c',
15 'bi_lower_spill.c',
16 'bi_lower_swizzle.c',
17 'bi_print.c',
18 'bi_opt_control_flow.c',
19 'bi_opt_constant_fold.c',
20 'bi_opt_copy_prop.c',
21 'bi_opt_dce.c',
22 'bi_opt_cse.c',
23 'bi_opt_push_ubo.c',
24 'bi_opt_mod_props.c',
25 'bi_opt_dual_tex.c',
26 'bi_iterator_schedule.c',
27 'bi_pressure_schedule.c',
28 'bi_ra.c',
29 'bi_ra_ssa.c',
30 'bi_spill_ssa.c',
31 'bi_reindex_ssa.c',
32 'bi_repair_ssa.c',
33 'bi_validate.c',
34 'bi_dominance.c',
35 'bi_debug.c',
36 'bir.c',
37 'bifrost_compile.c',
38 'bifrost_nir.c',
39 'bifrost/bi_opt_message_preload.c',
40 'bifrost/bi_pack.c',
41 'bifrost/bi_schedule.c',
42 'bifrost/bi_scoreboard.c',
43 'valhall/va_gather_hsr_info.c',
44 'valhall/va_insert_flow.c',
45 'valhall/va_lower_constants.c',
46 'valhall/va_lower_isel.c',
47 'valhall/va_lower_split_64bit.c',
48 'valhall/va_optimize.c',
49 'valhall/va_mark_last.c',
50 'valhall/va_merge_flow.c',
51 'valhall/va_pack.c',
52 'valhall/va_perf.c',
53 'valhall/va_validate.c',
54 )
55
56 bifrost_gen_disasm_c = custom_target(
57 'bifrost_gen_disasm.c',
58 input : ['gen_disasm.py', 'bifrost/ISA.xml'],
59 output : 'bifrost_gen_disasm.c',
60 command : [prog_python, '@INPUT@'],
61 capture : true,
62 depend_files : files('bifrost_isa.py'),
63 )
64
65 bi_opcodes_c = custom_target(
66 'bi_opcodes.c',
67 input : ['bi_opcodes.c.py', 'IR_pseudo.xml', 'bifrost/ISA.xml', 'valhall/ISA.xml'],
68 output : 'bi_opcodes.c',
69 command : [prog_python, '@INPUT@'],
70 capture : true,
71 depend_files : files('bifrost_isa.py'),
72 )
73
74 bi_swizzles_c = custom_target(
75 'bi_swizzles.c',
76 input : ['bi_swizzles.c.py', 'IR_pseudo.xml', 'bifrost/ISA.xml'],
77 output : 'bi_swizzles.c',
78 command : [prog_python, '@INPUT@'],
79 capture : true,
80 depend_files : files('bifrost_isa.py'),
81 )
82
83 bi_printer_c = custom_target(
84 'bi_printer.c',
85 input : ['bi_printer.c.py', 'IR_pseudo.xml', 'bifrost/ISA.xml', 'valhall/ISA.xml'],
86 output : 'bi_printer.c',
87 command : [prog_python, '@INPUT@'],
88 capture : true,
89 depend_files : files('bifrost_isa.py'),
90 )
91
92 bi_packer_c = custom_target(
93 'bi_packer.c',
94 input : ['bi_packer.c.py', 'IR_pseudo.xml', 'bifrost/ISA.xml', 'valhall/ISA.xml'],
95 output : 'bi_packer.c',
96 command : [prog_python, '@INPUT@'],
97 capture : true,
98 depend_files : files('bifrost_isa.py'),
99 )
100
101 bi_opcodes_h = custom_target(
102 'bi_opcodes.h',
103 input : ['bi_opcodes.h.py', 'IR_pseudo.xml', 'bifrost/ISA.xml', 'valhall/ISA.xml'],
104 output : 'bi_opcodes.h',
105 command : [prog_python, '@INPUT@'],
106 capture : true,
107 depend_files : files('bifrost_isa.py'),
108 )
109
110 idep_bi_opcodes_h = declare_dependency(
111 sources : [bi_opcodes_h],
112 include_directories : include_directories('.'),
113 )
114
115 bi_builder_h = custom_target(
116 'bi_builder.h',
117 input : ['bi_builder.h.py', 'IR_pseudo.xml', 'bifrost/ISA.xml', 'valhall/ISA.xml'],
118 output : 'bi_builder.h',
119 command : [prog_python, '@INPUT@'],
120 capture : true,
121 depend_files : files('bifrost_isa.py'),
122 )
123
124 idep_bi_builder_h = declare_dependency(
125 sources : [bi_builder_h],
126 include_directories : include_directories('.'),
127 )
128
129 bifrost_nir_algebraic_c = custom_target(
130 'bifrost_nir_algebraic.c',
131 input : 'bifrost_nir_algebraic.py',
132 output : 'bifrost_nir_algebraic.c',
133 command : [
134 prog_python, '@INPUT@', '-p', dir_compiler_nir,
135 ],
136 capture : true,
137 depend_files : nir_algebraic_depends,
138 )
139
140 libpanfrost_bifrost_disasm = static_library(
141 'panfrost_bifrost_disasm',
142 ['bifrost/disassemble.c', 'bi_print_common.c', bifrost_gen_disasm_c],
143 include_directories : [inc_include, inc_src],
144 dependencies: [idep_nir],
145 c_args : [no_override_init_args],
146 gnu_symbol_visibility : 'hidden',
147 build_by_default : false,
148 )
149
150 libpanfrost_bifrost = static_library(
151 'panfrost_bifrost',
152 [libpanfrost_bifrost_files, bi_opcodes_c, bi_swizzles_c, bi_printer_c, bi_packer_c, bifrost_nir_algebraic_c, valhall_c ],
153 include_directories : [inc_include, inc_src, inc_valhall],
154 dependencies: [idep_nir, idep_bi_opcodes_h, idep_bi_builder_h, idep_valhall_enums_h, libpanfrost_model_dep],
155 link_with: [libpanfrost_bifrost_disasm, libpanfrost_valhall_disasm],
156 c_args : [no_override_init_args],
157 gnu_symbol_visibility : 'hidden',
158 build_by_default : false,
159 )