mesa/src/panfrost/bifrost/meson.build

133 lines
4.0 KiB
Meson
Raw Normal View History

# Copyright © 2018 Rob Clark
# Copyright © 2019 Collabora
# 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.
libpanfrost_bifrost_files = files(
'bi_layout.c',
'bi_liveness.c',
'bi_print.c',
pan/bi: Add SSA-based scalar copy propagation This is a very simple (and slow...) copyprop pass. It's good enough to get rid of redundant moves from FAU, but it doesn't help for vector combines. total instructions in shared programs: 175219 -> 169141 (-3.47%) instructions in affected programs: 91439 -> 85361 (-6.65%) helped: 599 HURT: 0 helped stats (abs) min: 1 max: 112 x̄: 10.15 x̃: 6 helped stats (rel) min: 0.30% max: 33.33% x̄: 8.61% x̃: 8.04% 95% mean confidence interval for instructions value: -11.06 -9.24 95% mean confidence interval for instructions %-change: -9.07% -8.16% Instructions are helped. total nops in shared programs: 120011 -> 121049 (0.86%) nops in affected programs: 47355 -> 48393 (2.19%) helped: 110 HURT: 309 helped stats (abs) min: 1 max: 6 x̄: 2.07 x̃: 2 helped stats (rel) min: 0.44% max: 16.67% x̄: 3.59% x̃: 3.16% HURT stats (abs) min: 1 max: 56 x̄: 4.10 x̃: 2 HURT stats (rel) min: 0.32% max: 80.85% x̄: 6.85% x̃: 3.12% 95% mean confidence interval for nops value: 1.86 3.09 95% mean confidence interval for nops %-change: 3.08% 5.14% Nops are HURT. total clauses in shared programs: 40576 -> 40388 (-0.46%) clauses in affected programs: 3074 -> 2886 (-6.12%) helped: 106 HURT: 0 helped stats (abs) min: 1 max: 4 x̄: 1.77 x̃: 2 helped stats (rel) min: 0.42% max: 22.22% x̄: 7.17% x̃: 6.90% 95% mean confidence interval for clauses value: -1.91 -1.63 95% mean confidence interval for clauses %-change: -7.80% -6.53% Clauses are helped. total quadwords in shared programs: 146590 -> 144937 (-1.13%) quadwords in affected programs: 59475 -> 57822 (-2.78%) helped: 493 HURT: 1 helped stats (abs) min: 1 max: 28 x̄: 3.35 x̃: 2 helped stats (rel) min: 0.28% max: 15.38% x̄: 4.08% x̃: 3.85% HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1 HURT stats (rel) min: 2.38% max: 2.38% x̄: 2.38% x̃: 2.38% 95% mean confidence interval for quadwords value: -3.61 -3.08 95% mean confidence interval for quadwords %-change: -4.33% -3.81% Quadwords are helped. total spills in shared programs: 1106 -> 1106 (0.00%) spills in affected programs: 0 -> 0 helped: 0 HURT: 0 total fills in shared programs: 2241 -> 2241 (0.00%) fills in affected programs: 0 -> 0 helped: 0 HURT: 0 Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973>
2021-02-10 16:47:24 +00:00
'bi_opt_copy_prop.c',
'bi_opt_dce.c',
'bi_pack.c',
'bi_ra.c',
'bi_schedule.c',
'bi_test_pack.c',
'bir.c',
'bifrost_compile.c',
)
bifrost_nir_algebraic_c = custom_target(
'bifrost_nir_algebraic.c',
input : 'bifrost_nir_algebraic.py',
output : 'bifrost_nir_algebraic.c',
command : [
prog_python, '@INPUT@',
'-p', join_paths(meson.source_root(), 'src/compiler/nir/'),
],
capture : true,
depend_files : nir_algebraic_py,
)
bifrost_gen_disasm_c = custom_target(
'bifrost_gen_disasm.c',
input : ['gen_disasm.py', 'ISA.xml'],
output : 'bifrost_gen_disasm.c',
command : [prog_python, '@INPUT@'],
capture : true,
depend_files : files('bifrost_isa.py'),
)
bi_opcodes_c = custom_target(
'bi_opcodes.c',
input : ['bi_opcodes.c.py', 'ISA.xml'],
output : 'bi_opcodes.c',
command : [prog_python, '@INPUT@'],
capture : true,
depend_files : files('bifrost_isa.py'),
)
bi_printer_c = custom_target(
'bi_printer.c',
input : ['bi_printer.c.py', 'ISA.xml'],
output : 'bi_printer.c',
command : [prog_python, '@INPUT@'],
capture : true,
depend_files : files('bifrost_isa.py'),
)
bi_packer_c = custom_target(
'bi_packer.c',
input : ['bi_packer.c.py', 'ISA.xml'],
output : 'bi_packer.c',
command : [prog_python, '@INPUT@'],
capture : true,
depend_files : files('bifrost_isa.py'),
)
bi_opcodes_h = custom_target(
'bi_opcodes.h',
input : ['bi_opcodes.h.py', 'ISA.xml'],
output : 'bi_opcodes.h',
command : [prog_python, '@INPUT@'],
capture : true,
depend_files : files('bifrost_isa.py'),
)
idep_bi_opcodes_h = declare_dependency(
sources : [bi_opcodes_h],
include_directories : include_directories('.'),
)
bi_builder_h = custom_target(
'bi_builder.h',
input : ['bi_builder.h.py', 'ISA.xml'],
output : 'bi_builder.h',
command : [prog_python, '@INPUT@'],
capture : true,
depend_files : files('bifrost_isa.py'),
)
idep_bi_builder_h = declare_dependency(
sources : [bi_builder_h],
include_directories : include_directories('.'),
)
libpanfrost_bifrost_disasm = static_library(
'panfrost_bifrost_disasm',
['disassemble.c', 'bi_print_common.c', bifrost_gen_disasm_c],
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw],
dependencies: [idep_nir],
link_with: [libpanfrost_util],
c_args : [no_override_init_args],
gnu_symbol_visibility : 'hidden',
build_by_default : false,
)
libpanfrost_bifrost = static_library(
'panfrost_bifrost',
[libpanfrost_bifrost_files, bifrost_nir_algebraic_c, bi_opcodes_c, bi_printer_c, bi_packer_c],
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw],
dependencies: [idep_nir, idep_bi_opcodes_h, idep_bi_builder_h],
link_with: [libpanfrost_util, libpanfrost_bifrost_disasm],
c_args : [no_override_init_args],
gnu_symbol_visibility : 'hidden',
build_by_default : false,
)