summaryrefslogtreecommitdiffstats
path: root/src/amd/compiler/meson.build
diff options
context:
space:
mode:
authorDaniel Schürmann <[email protected]>2019-09-17 13:22:17 +0200
committerDaniel Schürmann <[email protected]>2019-09-19 12:10:00 +0200
commit93c8ebfa780ebd1495095e794731881aef29e7d3 (patch)
tree547268dbeabb0d17f14202d4429b3f6abfdb01c5 /src/amd/compiler/meson.build
parent99cbec0a5f463fef4d9c61f34482d9eb00293704 (diff)
aco: Initial commit of independent AMD compiler
ACO (short for AMD Compiler) is a new compiler backend with the goal to replace LLVM for Radeon hardware for the RADV driver. ACO currently supports only VS, PS and CS on VI and Vega. There are some optimizations missing because of unmerged NIR changes which may decrease performance. Full commit history can be found at https://github.com/daniel-schuermann/mesa/commits/backend Co-authored-by: Daniel Schürmann <[email protected]> Co-authored-by: Rhys Perry <[email protected]> Co-authored-by: Bas Nieuwenhuizen <[email protected]> Co-authored-by: Connor Abbott <[email protected]> Co-authored-by: Michael Schellenberger Costa <[email protected]> Co-authored-by: Timur Kristóf <[email protected]> Acked-by: Samuel Pitoiset <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/compiler/meson.build')
-rw-r--r--src/amd/compiler/meson.build103
1 files changed, 103 insertions, 0 deletions
diff --git a/src/amd/compiler/meson.build b/src/amd/compiler/meson.build
new file mode 100644
index 00000000000..73151cad6eb
--- /dev/null
+++ b/src/amd/compiler/meson.build
@@ -0,0 +1,103 @@
+# Copyright © 2018 Valve Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+aco_depends = files('aco_opcodes.py')
+
+aco_opcodes_h = custom_target(
+ 'aco_opcodes.h',
+ input : 'aco_opcodes_h.py',
+ output : 'aco_opcodes.h',
+ command : [prog_python, '@INPUT@'],
+ capture : true,
+ depend_files : aco_depends,
+)
+
+aco_opcodes_c = custom_target(
+ 'aco_opcodes.cpp',
+ input : 'aco_opcodes_cpp.py',
+ output : 'aco_opcodes.cpp',
+ command : [prog_python, '@INPUT@'],
+ capture : true,
+ depend_files : aco_depends,
+)
+
+aco_builder_h = custom_target(
+ 'aco_builder.h',
+ input : 'aco_builder_h.py',
+ output : 'aco_builder.h',
+ command : [prog_python, '@INPUT@'],
+ capture : true,
+ depend_files : aco_depends,
+)
+
+# Headers-only dependency
+idep_aco_headers = declare_dependency(
+ sources : [aco_opcodes_h],
+ include_directories : include_directories('.'),
+)
+
+libaco_files = files(
+ 'aco_dead_code_analysis.cpp',
+ 'aco_dominance.cpp',
+ 'aco_instruction_selection.cpp',
+ 'aco_instruction_selection_setup.cpp',
+ 'aco_interface.cpp',
+ 'aco_interface.h',
+ 'aco_ir.h',
+ 'aco_assembler.cpp',
+ 'aco_insert_exec_mask.cpp',
+ 'aco_insert_NOPs.cpp',
+ 'aco_insert_waitcnt.cpp',
+ 'aco_reduce_assign.cpp',
+ 'aco_register_allocation.cpp',
+ 'aco_live_var_analysis.cpp',
+ 'aco_lower_bool_phis.cpp',
+ 'aco_lower_to_hw_instr.cpp',
+ 'aco_optimizer.cpp',
+ 'aco_opt_value_numbering.cpp',
+ 'aco_print_asm.cpp',
+ 'aco_print_ir.cpp',
+ 'aco_scheduler.cpp',
+ 'aco_ssa_elimination.cpp',
+ 'aco_spill.cpp',
+ 'aco_util.h',
+ 'aco_validate.cpp',
+)
+
+_libaco = static_library(
+ 'aco',
+ [libaco_files, aco_opcodes_c, aco_opcodes_h, aco_builder_h],
+ include_directories : [
+ inc_common, inc_compiler, inc_mesa, inc_mapi, inc_amd, inc_amd_common,
+ ],
+ dependencies : [
+ dep_llvm, dep_thread, dep_elf, dep_libdrm_amdgpu, dep_valgrind,
+ idep_nir_headers, idep_amdgfxregs_h,
+ ],
+ c_args : [c_vis_args],
+ cpp_args : [cpp_vis_args],
+ build_by_default : true,
+)
+
+# Also link with aco
+idep_aco = declare_dependency(
+ dependencies : idep_aco_headers,
+ link_with : _libaco,
+)