intel/common: Add unit tests for gen_mi_builder
[mesa.git] / src / intel / Makefile.compiler.am
1 # Copyright 2015-2016 Intel Corporation
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 # and/or sell copies of the Software, and to permit persons to whom the
8 # Software is furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice (including the next
11 # paragraph) shall be included in all copies or substantial portions of the
12 # Software.
13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 # IN THE SOFTWARE.
21
22 noinst_LTLIBRARIES += compiler/libintel_compiler.la
23
24 compiler_libintel_compiler_la_CPPFLAGS = \
25 -I$(top_builddir)/src/intel/compiler \
26 -I$(top_srcdir)/src/intel/compiler \
27 $(AM_CPPFLAGS)
28
29 compiler_libintel_compiler_la_SOURCES = \
30 $(COMPILER_FILES) \
31 $(COMPILER_GENERATED_FILES)
32
33 BUILT_SOURCES += $(COMPILER_GENERATED_FILES)
34
35 compiler/brw_nir_trig_workarounds.c: compiler/brw_nir_trig_workarounds.py \
36 $(top_srcdir)/src/compiler/nir/nir_algebraic.py
37 $(MKDIR_GEN)
38 $(AM_V_GEN) $(PYTHON) $(PYTHON_FLAGS) $(srcdir)/compiler/brw_nir_trig_workarounds.py -p $(top_srcdir)/src/compiler/nir > $@ || ($(RM) $@; false)
39
40 EXTRA_DIST += \
41 compiler/brw_nir_trig_workarounds.py
42
43 # ----------------------------------------------------------------------------
44 # Tests
45 # ----------------------------------------------------------------------------
46
47 TEST_LIBS = \
48 $(top_builddir)/src/gtest/libgtest.la \
49 compiler/libintel_compiler.la \
50 common/libintel_common.la \
51 dev/libintel_dev.la \
52 $(top_builddir)/src/compiler/nir/libnir.la \
53 $(top_builddir)/src/intel/isl/libisl.la \
54 $(top_builddir)/src/util/libmesautil.la \
55 $(PTHREAD_LIBS) \
56 $(DLOPEN_LIBS)
57
58 COMPILER_TESTS = \
59 compiler/test_fs_cmod_propagation \
60 compiler/test_fs_copy_propagation \
61 compiler/test_fs_saturate_propagation \
62 compiler/test_eu_compact \
63 compiler/test_eu_validate \
64 compiler/test_vf_float_conversions \
65 compiler/test_vec4_cmod_propagation \
66 compiler/test_vec4_copy_propagation \
67 compiler/test_vec4_dead_code_eliminate \
68 compiler/test_vec4_register_coalesce
69
70 TESTS += $(COMPILER_TESTS)
71 check_PROGRAMS += $(COMPILER_TESTS)
72
73 compiler_test_fs_cmod_propagation_SOURCES = \
74 compiler/test_fs_cmod_propagation.cpp
75 compiler_test_fs_cmod_propagation_LDADD = $(TEST_LIBS)
76
77 compiler_test_fs_copy_propagation_SOURCES = \
78 compiler/test_fs_copy_propagation.cpp
79 compiler_test_fs_copy_propagation_LDADD = $(TEST_LIBS)
80
81 compiler_test_fs_saturate_propagation_SOURCES = \
82 compiler/test_fs_saturate_propagation.cpp
83 compiler_test_fs_saturate_propagation_LDADD = $(TEST_LIBS)
84
85 compiler_test_vf_float_conversions_SOURCES = \
86 compiler/test_vf_float_conversions.cpp
87 compiler_test_vf_float_conversions_LDADD = $(TEST_LIBS)
88
89 compiler_test_vec4_register_coalesce_SOURCES = \
90 compiler/test_vec4_register_coalesce.cpp
91 compiler_test_vec4_register_coalesce_LDADD = $(TEST_LIBS)
92
93 compiler_test_vec4_copy_propagation_SOURCES = \
94 compiler/test_vec4_copy_propagation.cpp
95 compiler_test_vec4_copy_propagation_LDADD = $(TEST_LIBS)
96
97 compiler_test_vec4_cmod_propagation_SOURCES = \
98 compiler/test_vec4_cmod_propagation.cpp
99 compiler_test_vec4_cmod_propagation_LDADD = $(TEST_LIBS)
100
101 compiler_test_vec4_dead_code_eliminate_SOURCES = \
102 compiler/test_vec4_dead_code_eliminate.cpp
103 compiler_test_vec4_dead_code_eliminate_LDADD = $(TEST_LIBS)
104
105 # Strictly speaking this is neither a C++ test nor using gtest - we can address
106 # address that at a later point. Until then, this allows us a to simplify things.
107 compiler_test_eu_compact_SOURCES = \
108 compiler/test_eu_compact.cpp
109 compiler_test_eu_compact_LDADD = $(TEST_LIBS)
110
111 compiler_test_eu_validate_SOURCES = \
112 compiler/test_eu_validate.cpp
113 compiler_test_eu_validate_LDADD = $(TEST_LIBS)