mesa/src/panfrost/bifrost/meson.build

192 lines
5.8 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.
subdir('valhall')
inc_valhall = include_directories(['.', 'valhall'])
libpanfrost_bifrost_files = files(
'bi_helper_invocations.c',
'bi_layout.c',
'bi_liveness.c',
'bi_lower_divergent_indirects.c',
'bi_lower_swizzle.c',
'bi_lower_xfb.c',
'bi_print.c',
'bi_opt_constant_fold.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',
pan/bi: Add a constant subexpression elimination pass ALU only. Intended to clean up the lowerings used with complex texturings. Ex: if a shader reads two cube maps at the same coordinates, this deduplicates the cube map transformation. This needs to happen in the backend since we do the cube map transformation with the backend builder, rather than special NIR ops. This is a tradeoff. Pass based on ir3's, which in turn is inspired by NIR's. total instructions in shared programs: 148799 -> 147348 (-0.98%) instructions in affected programs: 20509 -> 19058 (-7.07%) helped: 145 HURT: 0 helped stats (abs) min: 4.0 max: 30.0 x̄: 10.01 x̃: 8 helped stats (rel) min: 1.92% max: 54.55% x̄: 10.87% x̃: 7.41% 95% mean confidence interval for instructions value: -10.73 -9.28 95% mean confidence interval for instructions %-change: -12.81% -8.94% Instructions are helped. total tuples in shared programs: 129992 -> 128908 (-0.83%) tuples in affected programs: 17624 -> 16540 (-6.15%) helped: 145 HURT: 0 helped stats (abs) min: 2.0 max: 25.0 x̄: 7.48 x̃: 7 helped stats (rel) min: 0.74% max: 42.86% x̄: 9.16% x̃: 7.22% 95% mean confidence interval for tuples value: -7.96 -6.99 95% mean confidence interval for tuples %-change: -10.52% -7.79% Tuples are helped. total clauses in shared programs: 27632 -> 27582 (-0.18%) clauses in affected programs: 1077 -> 1027 (-4.64%) helped: 44 HURT: 0 helped stats (abs) min: 1.0 max: 3.0 x̄: 1.14 x̃: 1 helped stats (rel) min: 2.50% max: 16.67% x̄: 4.99% x̃: 4.45% 95% mean confidence interval for clauses value: -1.26 -1.01 95% mean confidence interval for clauses %-change: -5.70% -4.27% Clauses are helped. total cycles in shared programs: 12323 -> 12285.63 (-0.30%) cycles in affected programs: 618.25 -> 580.88 (-6.05%) helped: 120 HURT: 0 helped stats (abs) min: 0.08333299999999966 max: 0.5416680000000014 x̄: 0.31 x̃: 0 helped stats (rel) min: 0.77% max: 66.67% x̄: 7.60% x̃: 7.37% 95% mean confidence interval for cycles value: -0.33 -0.29 95% mean confidence interval for cycles %-change: -8.73% -6.47% Cycles are helped. total arith in shared programs: 4916.75 -> 4866.88 (-1.01%) arith in affected programs: 677.79 -> 627.92 (-7.36%) helped: 145 HURT: 0 helped stats (abs) min: 0.08333299999999966 max: 1.0833329999999997 x̄: 0.34 x̃: 0 helped stats (rel) min: 0.77% max: 66.67% x̄: 12.81% x̃: 7.87% 95% mean confidence interval for arith value: -0.37 -0.32 95% mean confidence interval for arith %-change: -15.33% -10.29% Arith are helped. total quadwords in shared programs: 118117 -> 117262 (-0.72%) quadwords in affected programs: 15283 -> 14428 (-5.59%) helped: 143 HURT: 0 helped stats (abs) min: 1.0 max: 23.0 x̄: 5.98 x̃: 5 helped stats (rel) min: 0.44% max: 25.71% x̄: 7.56% x̃: 5.56% 95% mean confidence interval for quadwords value: -6.46 -5.50 95% mean confidence interval for quadwords %-change: -8.59% -6.53% Quadwords are helped. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11733>
2021-06-25 00:36:11 +01:00
'bi_opt_cse.c',
pan/bi: Push UBOs on Bifrost Based on the Midgard pass. Results look better since Midgard already had a basic UBO pushing pass to begin with. Particularly nice to see the dramatic reduction in spilling. total instructions in shared programs: 169141 -> 161215 (-4.69%) instructions in affected programs: 164102 -> 156176 (-4.83%) helped: 1269 HURT: 90 helped stats (abs) min: 1 max: 61 x̄: 6.50 x̃: 4 helped stats (rel) min: 0.15% max: 17.58% x̄: 6.31% x̃: 5.88% HURT stats (abs) min: 1 max: 170 x̄: 3.58 x̃: 1 HURT stats (rel) min: 0.08% max: 133.33% x̄: 16.65% x̃: 5.26% 95% mean confidence interval for instructions value: -6.28 -5.38 95% mean confidence interval for instructions %-change: -5.39% -4.18% Instructions are helped. total nops in shared programs: 121049 -> 120997 (-0.04%) nops in affected programs: 110024 -> 109972 (-0.05%) helped: 501 HURT: 758 helped stats (abs) min: 1 max: 45 x̄: 5.54 x̃: 2 helped stats (rel) min: 0.25% max: 47.06% x̄: 6.81% x̃: 4.55% HURT stats (abs) min: 1 max: 102 x̄: 3.59 x̃: 3 HURT stats (rel) min: 0.32% max: 50.00% x̄: 7.13% x̃: 6.06% 95% mean confidence interval for nops value: -0.45 0.37 95% mean confidence interval for nops %-change: 1.07% 2.09% Inconclusive result (value mean confidence interval includes 0). total clauses in shared programs: 40388 -> 31610 (-21.73%) clauses in affected programs: 38825 -> 30047 (-22.61%) helped: 1367 HURT: 2 helped stats (abs) min: 1 max: 58 x̄: 6.43 x̃: 5 helped stats (rel) min: 1.34% max: 55.56% x̄: 24.97% x̃: 25.00% HURT stats (abs) min: 2 max: 12 x̄: 7.00 x̃: 7 HURT stats (rel) min: 5.08% max: 6.67% x̄: 5.88% x̃: 5.88% 95% mean confidence interval for clauses value: -6.74 -6.08 95% mean confidence interval for clauses %-change: -25.50% -24.35% Clauses are helped. total quadwords in shared programs: 144937 -> 130686 (-9.83%) quadwords in affected programs: 140419 -> 126168 (-10.15%) helped: 1369 HURT: 13 helped stats (abs) min: 1 max: 112 x̄: 10.50 x̃: 7 helped stats (rel) min: 0.23% max: 31.82% x̄: 11.36% x̃: 10.78% HURT stats (abs) min: 1 max: 106 x̄: 10.00 x̃: 1 HURT stats (rel) min: 5.88% max: 10.24% x̄: 9.26% x̃: 10.00% 95% mean confidence interval for quadwords value: -10.96 -9.66 95% mean confidence interval for quadwords %-change: -11.52% -10.82% Quadwords are helped. total spills in shared programs: 1106 -> 705 (-36.26%) spills in affected programs: 1058 -> 657 (-37.90%) helped: 41 HURT: 0 total fills in shared programs: 2241 -> 1645 (-26.60%) fills in affected programs: 2219 -> 1623 (-26.86%) helped: 43 HURT: 2 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-09 23:23:06 +00:00
'bi_opt_push_ubo.c',
pan/bi: Support message preloading Preload LD_VAR_IMM or VAR_TEX instructions in the first block of fragment shaders on v7. Preloaded messages write to fixed registers; when replacing instructions we insert moves from the registers at the start of the program and hope coalescing goes to town. (Admittedly we don't do any coalescing yet...) The extra moves hurts instruction count in some cases; the win for cycle count should cancel this out. When we get smarter copy prop or RA, those moves should go away anyway. This optimization may hurt register pressure by extending the lifetime of up to eight registers written in the first block. This is expected to be acceptable: on a large shader-db, there are no additional spills/fills, and only two shaders are hurt on thread count. This optimization only applies to v7, as the hardware was not introduced on v6 and was removed for Valhall. total instructions in shared programs: 2451624 -> 2454286 (0.11%) instructions in affected programs: 909046 -> 911708 (0.29%) helped: 4719 HURT: 3341 helped stats (abs) min: 1.0 max: 10.0 x̄: 1.49 x̃: 1 helped stats (rel) min: 0.08% max: 33.33% x̄: 6.79% x̃: 3.92% HURT stats (abs) min: 1.0 max: 50.0 x̄: 2.90 x̃: 2 HURT stats (rel) min: 0.12% max: 66.67% x̄: 6.39% x̃: 3.45% 95% mean confidence interval for instructions value: 0.27 0.39 95% mean confidence interval for instructions %-change: -1.55% -1.11% Inconclusive result (value mean confidence interval and %-change mean confidence interval disagree). total tuples in shared programs: 1969529 -> 1963429 (-0.31%) tuples in affected programs: 601327 -> 595227 (-1.01%) helped: 5907 HURT: 1297 helped stats (abs) min: 1.0 max: 8.0 x̄: 1.41 x̃: 1 helped stats (rel) min: 0.07% max: 33.33% x̄: 7.25% x̃: 5.26% HURT stats (abs) min: 1.0 max: 40.0 x̄: 1.73 x̃: 1 HURT stats (rel) min: 0.16% max: 31.75% x̄: 3.38% x̃: 2.02% 95% mean confidence interval for tuples value: -0.88 -0.81 95% mean confidence interval for tuples %-change: -5.52% -5.15% Tuples are helped. total clauses in shared programs: 401689 -> 387830 (-3.45%) clauses in affected programs: 136944 -> 123085 (-10.12%) helped: 8427 HURT: 4 helped stats (abs) min: 1.0 max: 4.0 x̄: 1.65 x̃: 2 helped stats (rel) min: 0.49% max: 50.00% x̄: 19.88% x̃: 18.18% HURT stats (abs) min: 1.0 max: 4.0 x̄: 2.50 x̃: 2 HURT stats (rel) min: 1.96% max: 19.05% x̄: 14.18% x̃: 17.86% 95% mean confidence interval for clauses value: -1.66 -1.63 95% mean confidence interval for clauses %-change: -20.15% -19.58% Clauses are helped. total cycles in shared programs: 202735.83 -> 201862.21 (-0.43%) cycles in affected programs: 16295.46 -> 15421.83 (-5.36%) helped: 3349 HURT: 1962 helped stats (abs) min: 0.041665999999999315 max: 1.0 x̄: 0.32 x̃: 0 helped stats (rel) min: 0.24% max: 100.00% x̄: 40.77% x̃: 33.33% HURT stats (abs) min: 0.041665999999999315 max: 1.5833329999999997 x̄: 0.10 x̃: 0 HURT stats (rel) min: 0.09% max: 31.40% x̄: 2.95% x̃: 1.94% 95% mean confidence interval for cycles value: -0.17 -0.16 95% mean confidence interval for cycles %-change: -25.48% -23.76% Cycles are helped. total arith in shared programs: 74665.50 -> 74920.00 (0.34%) arith in affected programs: 16059.92 -> 16314.42 (1.58%) helped: 860 HURT: 3409 helped stats (abs) min: 0.041665999999999315 max: 0.25 x̄: 0.06 x̃: 0 helped stats (rel) min: 0.24% max: 37.50% x̄: 4.73% x̃: 2.56% HURT stats (abs) min: 0.041665999999999315 max: 1.5833329999999997 x̄: 0.09 x̃: 0 HURT stats (rel) min: 0.09% max: 100.00% x̄: 8.99% x̃: 4.21% 95% mean confidence interval for arith value: 0.06 0.06 95% mean confidence interval for arith %-change: 5.83% 6.62% Arith are HURT. total texture in shared programs: 13083.50 -> 11877 (-9.22%) texture in affected programs: 1663 -> 456.50 (-72.55%) helped: 2377 HURT: 3 helped stats (abs) min: 0.5 max: 1.0 x̄: 0.51 x̃: 0 helped stats (rel) min: 6.25% max: 100.00% x̄: 87.12% x̃: 100.00% HURT stats (abs) min: 0.5 max: 0.5 x̄: 0.50 x̃: 0 HURT stats (rel) min: 0.00% max: 25.00% x̄: 16.67% x̃: 25.00% 95% mean confidence interval for texture value: -0.51 -0.50 95% mean confidence interval for texture %-change: -87.98% -86.00% Texture are helped. total vary in shared programs: 10220.62 -> 4183.88 (-59.06%) vary in affected programs: 10126.50 -> 4089.75 (-59.61%) helped: 8538 HURT: 0 helped stats (abs) min: 0.125 max: 1.0 x̄: 0.71 x̃: 0 helped stats (rel) min: 7.14% max: 100.00% x̄: 74.74% x̃: 87.50% 95% mean confidence interval for vary value: -0.71 -0.70 95% mean confidence interval for vary %-change: -75.32% -74.16% Vary are helped. total quadwords in shared programs: 1766717 -> 1757161 (-0.54%) quadwords in affected programs: 553801 -> 544245 (-1.73%) helped: 6760 HURT: 711 helped stats (abs) min: 1.0 max: 11.0 x̄: 1.58 x̃: 1 helped stats (rel) min: 0.09% max: 29.41% x̄: 5.31% x̃: 4.84% HURT stats (abs) min: 1.0 max: 33.0 x̄: 1.54 x̃: 1 HURT stats (rel) min: 0.10% max: 31.13% x̄: 2.53% x̃: 1.61% 95% mean confidence interval for quadwords value: -1.31 -1.25 95% mean confidence interval for quadwords %-change: -4.67% -4.46% Quadwords are helped. total threads in shared programs: 52899 -> 52897 (<.01%) threads in affected programs: 4 -> 2 (-50.00%) helped: 0 HURT: 2 total preloads in shared programs: 0 -> 116492 preloads in affected programs: 0 -> 116492 helped: 0 HURT: 8604 HURT stats (abs) min: 2.0 max: 24.0 x̄: 13.54 x̃: 14 HURT stats (rel) min: 0.00% max: 0.00% x̄: 0.00% x̃: 0.00% 95% mean confidence interval for preloads value: 13.45 13.63 95% mean confidence interval for preloads %-change: 0.00% 0.00% Preloads are HURT. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9438>
2022-02-23 18:50:54 +00:00
'bi_opt_message_preload.c',
pan/bi: Propagate fabs/neg/sat Initial support for modifier propagation. Bifrost makes this unreasonably hard. total instructions in shared programs: 151604 -> 150761 (-0.56%) instructions in affected programs: 48773 -> 47930 (-1.73%) helped: 212 HURT: 0 helped stats (abs) min: 1 max: 28 x̄: 3.98 x̃: 1 helped stats (rel) min: 0.29% max: 12.70% x̄: 1.75% x̃: 1.26% 95% mean confidence interval for instructions value: -4.71 -3.25 95% mean confidence interval for instructions %-change: -1.97% -1.53% Instructions are helped. total tuples in shared programs: 131876 -> 131560 (-0.24%) tuples in affected programs: 25393 -> 25077 (-1.24%) helped: 104 HURT: 3 helped stats (abs) min: 1 max: 28 x̄: 3.08 x̃: 2 helped stats (rel) min: 0.34% max: 8.57% x̄: 1.55% x̃: 1.04% HURT stats (abs) min: 1 max: 2 x̄: 1.33 x̃: 1 HURT stats (rel) min: 0.51% max: 2.86% x̄: 1.30% x̃: 0.53% 95% mean confidence interval for tuples value: -3.63 -2.28 95% mean confidence interval for tuples %-change: -1.73% -1.21% Tuples are helped. total clauses in shared programs: 28122 -> 28032 (-0.32%) clauses in affected programs: 2720 -> 2630 (-3.31%) helped: 58 HURT: 1 helped stats (abs) min: 1 max: 6 x̄: 1.57 x̃: 1 helped stats (rel) min: 0.88% max: 14.29% x̄: 4.06% x̃: 3.67% HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1 HURT stats (rel) min: 7.69% max: 7.69% x̄: 7.69% x̃: 7.69% 95% mean confidence interval for clauses value: -1.85 -1.20 95% mean confidence interval for clauses %-change: -4.60% -3.13% Clauses are helped. total quadwords in shared programs: 119778 -> 119509 (-0.22%) quadwords in affected programs: 20698 -> 20429 (-1.30%) helped: 95 HURT: 1 helped stats (abs) min: 1 max: 28 x̄: 2.85 x̃: 2 helped stats (rel) min: 0.38% max: 7.14% x̄: 1.50% x̃: 1.13% HURT stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2 HURT stats (rel) min: 3.23% max: 3.23% x̄: 3.23% x̃: 3.23% 95% mean confidence interval for quadwords value: -3.49 -2.11 95% mean confidence interval for quadwords %-change: -1.71% -1.20% Quadwords are helped. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327>
2021-06-11 00:05:29 +01:00
'bi_opt_mod_props.c',
'bi_opt_dual_tex.c',
pan/bi: Schedule for pressure pre-RA Add a bottom-up pre-RA list scheduler that aims to reduce register pressure, roughly the same as we use on Midgard to great effect. It uses a simple heuristic: greedily select instructions that have reduce liveness. To avoid regressions, the algorithm throws away schedules that increase maximum number of lives (used as an estimate of register pressure -- if we had SSA form, this would be exact). We might be better off using Sarkar. But for something I could type out in an afternoon, I'll happily accept a >50% reduction in spills. Instruction count is regressed due to extra moves around the blend shader ABI in some cases, at least on Bifrost this is mostly hidden by the clause scheduler. Thread count and spills/fills are both much improved here. There are numerous opportunities for future improvements to pre-RA scheduling: * Better heuristics? (Something more global than liveness alone) * Reducing false dependencies with memory access * Improve ILP for message-passing instructions? This is a tradeoff. * Simplify the code if we have SSA in the future. But for now, I think this is well worth it already. v2: Various clean-ups and memory leak fix (Icecream95). Reduce false dependencies to eliminate spilling in more shaders. shader-db stats on Mali-G52: total instructions in shared programs: 2438841 -> 2439698 (0.04%) instructions in affected programs: 1206421 -> 1207278 (0.07%) helped: 3113 HURT: 4011 helped stats (abs) min: 1.0 max: 50.0 x̄: 3.25 x̃: 2 helped stats (rel) min: 0.13% max: 44.83% x̄: 4.09% x̃: 2.11% HURT stats (abs) min: 1.0 max: 18.0 x̄: 2.73 x̃: 2 HURT stats (rel) min: 0.11% max: 57.14% x̄: 3.86% x̃: 2.07% 95% mean confidence interval for instructions value: 0.02 0.22 95% mean confidence interval for instructions %-change: 0.23% 0.54% Instructions are HURT. total tuples in shared programs: 1927077 -> 1946583 (1.01%) tuples in affected programs: 1118627 -> 1138133 (1.74%) helped: 2874 HURT: 6295 helped stats (abs) min: 1.0 max: 82.0 x̄: 3.51 x̃: 2 helped stats (rel) min: 0.17% max: 33.33% x̄: 4.60% x̃: 3.57% HURT stats (abs) min: 1.0 max: 47.0 x̄: 4.70 x̃: 3 HURT stats (rel) min: 0.20% max: 50.00% x̄: 5.16% x̃: 4.32% 95% mean confidence interval for tuples value: 2.00 2.25 95% mean confidence interval for tuples %-change: 1.97% 2.23% Tuples are HURT. total clauses in shared programs: 356053 -> 357793 (0.49%) clauses in affected programs: 151578 -> 153318 (1.15%) helped: 2196 HURT: 3813 helped stats (abs) min: 1.0 max: 49.0 x̄: 2.16 x̃: 1 helped stats (rel) min: 0.18% max: 69.01% x̄: 10.26% x̃: 8.33% HURT stats (abs) min: 1.0 max: 25.0 x̄: 1.70 x̃: 1 HURT stats (rel) min: 0.57% max: 66.67% x̄: 10.64% x̃: 8.33% 95% mean confidence interval for clauses value: 0.22 0.36 95% mean confidence interval for clauses %-change: 2.68% 3.33% Clauses are HURT. total cycles in shared programs: 167761.17 -> 167922.04 (0.10%) cycles in affected programs: 24494.21 -> 24655.08 (0.66%) helped: 862 HURT: 3054 helped stats (abs) min: 0.041665999999999315 max: 53.0 x̄: 0.69 x̃: 0 helped stats (rel) min: 0.28% max: 76.81% x̄: 5.65% x̃: 3.03% HURT stats (abs) min: 0.041665999999999315 max: 2.0416659999999993 x̄: 0.25 x̃: 0 HURT stats (rel) min: 0.26% max: 41.18% x̄: 4.91% x̃: 3.92% 95% mean confidence interval for cycles value: -0.04 0.12 95% mean confidence interval for cycles %-change: 2.36% 2.81% Inconclusive result (value mean confidence interval includes 0). total arith in shared programs: 73875.37 -> 74393.17 (0.70%) arith in affected programs: 43142.42 -> 43660.21 (1.20%) helped: 3632 HURT: 5443 helped stats (abs) min: 0.041665999999999315 max: 1.2083360000000027 x̄: 0.15 x̃: 0 helped stats (rel) min: 0.22% max: 100.00% x̄: 6.70% x̃: 4.76% HURT stats (abs) min: 0.041665999999999315 max: 2.0416659999999993 x̄: 0.19 x̃: 0 HURT stats (rel) min: 0.00% max: 166.67% x̄: 5.91% x̃: 4.08% 95% mean confidence interval for arith value: 0.05 0.06 95% mean confidence interval for arith %-change: 0.65% 1.07% Arith are HURT. total texture in shared programs: 11936 -> 11936 (0.00%) texture in affected programs: 0 -> 0 helped: 0 HURT: 0 total vary in shared programs: 4180.88 -> 4180.88 (0.00%) vary in affected programs: 0 -> 0 helped: 0 HURT: 0 total ldst in shared programs: 137551 -> 137028 (-0.38%) ldst in affected programs: 834 -> 311 (-62.71%) helped: 13 HURT: 0 helped stats (abs) min: 15.0 max: 53.0 x̄: 40.23 x̃: 53 helped stats (rel) min: 19.15% max: 100.00% x̄: 68.11% x̃: 76.81% 95% mean confidence interval for ldst value: -50.49 -29.98 95% mean confidence interval for ldst %-change: -84.37% -51.84% Ldst are helped. total quadwords in shared programs: 1684883 -> 1692021 (0.42%) quadwords in affected programs: 949463 -> 956601 (0.75%) helped: 3981 HURT: 5098 helped stats (abs) min: 1.0 max: 86.0 x̄: 3.53 x̃: 3 helped stats (rel) min: 0.18% max: 33.33% x̄: 5.82% x̃: 4.48% HURT stats (abs) min: 1.0 max: 50.0 x̄: 4.15 x̃: 3 HURT stats (rel) min: 0.17% max: 50.00% x̄: 5.11% x̃: 3.85% 95% mean confidence interval for quadwords value: 0.67 0.90 95% mean confidence interval for quadwords %-change: 0.17% 0.47% Quadwords are HURT. total threads in shared programs: 53276 -> 53653 (0.71%) threads in affected programs: 581 -> 958 (64.89%) helped: 445 HURT: 68 helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1 helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00% HURT stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1 HURT stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00% 95% mean confidence interval for threads value: 0.68 0.79 95% mean confidence interval for threads %-change: 75.70% 84.53% Threads are helped. total preloads in shared programs: 116312 -> 116312 (0.00%) preloads in affected programs: 0 -> 0 helped: 0 HURT: 0 total loops in shared programs: 128 -> 128 (0.00%) loops in affected programs: 0 -> 0 helped: 0 HURT: 0 total spills in shared programs: 92 -> 37 (-59.78%) spills in affected programs: 55 -> 0 helped: 13 HURT: 0 total fills in shared programs: 658 -> 190 (-71.12%) fills in affected programs: 468 -> 0 helped: 13 HURT: 0 Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16378>
2022-05-06 18:49:30 +01:00
'bi_pressure_schedule.c',
'bi_pack.c',
'bi_ra.c',
'bi_schedule.c',
'bi_scoreboard.c',
'bi_validate.c',
'bir.c',
'bifrost_compile.c',
'valhall/va_insert_flow.c',
'valhall/va_lower_constants.c',
'valhall/va_lower_isel.c',
'valhall/va_lower_split_64bit.c',
'valhall/va_optimize.c',
'valhall/va_mark_last.c',
'valhall/va_merge_flow.c',
'valhall/va_pack.c',
'valhall/va_perf.c',
'valhall/va_validate.c',
)
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('.'),
)
pan/bi: Add back custom algebraic opts Right now just do a trivial one to test the infrastructure. In the next commit we'll use this for a more interesting optimization that's a bit painful in BIR but trivial with nir_search. total instructions in shared programs: 149566 -> 149562 (<.01%) instructions in affected programs: 502 -> 498 (-0.80%) helped: 3 HURT: 0 helped stats (abs) min: 1 max: 2 x̄: 1.33 x̃: 1 helped stats (rel) min: 0.38% max: 1.30% x̄: 0.97% x̃: 1.21% total tuples in shared programs: 130957 -> 130487 (-0.36%) tuples in affected programs: 54752 -> 54282 (-0.86%) helped: 303 HURT: 2 helped stats (abs) min: 1 max: 29 x̄: 1.56 x̃: 1 helped stats (rel) min: 0.13% max: 7.14% x̄: 1.08% x̃: 0.92% HURT stats (abs) min: 1 max: 2 x̄: 1.50 x̃: 1 HURT stats (rel) min: 1.89% max: 2.99% x̄: 2.44% x̃: 2.44% 95% mean confidence interval for tuples value: -1.79 -1.30 95% mean confidence interval for tuples %-change: -1.17% -0.95% Tuples are helped. total clauses in shared programs: 27877 -> 27827 (-0.18%) clauses in affected programs: 1556 -> 1506 (-3.21%) helped: 45 HURT: 0 helped stats (abs) min: 1 max: 2 x̄: 1.11 x̃: 1 helped stats (rel) min: 1.43% max: 9.52% x̄: 3.88% x̃: 3.57% 95% mean confidence interval for clauses value: -1.21 -1.02 95% mean confidence interval for clauses %-change: -4.38% -3.39% Clauses are helped. total quadwords in shared programs: 119058 -> 118563 (-0.42%) quadwords in affected programs: 33777 -> 33282 (-1.47%) helped: 250 HURT: 2 helped stats (abs) min: 1 max: 29 x̄: 1.99 x̃: 1 helped stats (rel) min: 0.23% max: 11.11% x̄: 1.67% x̃: 1.40% HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1 HURT stats (rel) min: 1.64% max: 2.00% x̄: 1.82% x̃: 1.82% 95% mean confidence interval for quadwords value: -2.27 -1.66 95% mean confidence interval for quadwords %-change: -1.80% -1.49% Quadwords are helped. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327>
2021-06-11 01:21:28 +01:00
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', dir_compiler_nir,
pan/bi: Add back custom algebraic opts Right now just do a trivial one to test the infrastructure. In the next commit we'll use this for a more interesting optimization that's a bit painful in BIR but trivial with nir_search. total instructions in shared programs: 149566 -> 149562 (<.01%) instructions in affected programs: 502 -> 498 (-0.80%) helped: 3 HURT: 0 helped stats (abs) min: 1 max: 2 x̄: 1.33 x̃: 1 helped stats (rel) min: 0.38% max: 1.30% x̄: 0.97% x̃: 1.21% total tuples in shared programs: 130957 -> 130487 (-0.36%) tuples in affected programs: 54752 -> 54282 (-0.86%) helped: 303 HURT: 2 helped stats (abs) min: 1 max: 29 x̄: 1.56 x̃: 1 helped stats (rel) min: 0.13% max: 7.14% x̄: 1.08% x̃: 0.92% HURT stats (abs) min: 1 max: 2 x̄: 1.50 x̃: 1 HURT stats (rel) min: 1.89% max: 2.99% x̄: 2.44% x̃: 2.44% 95% mean confidence interval for tuples value: -1.79 -1.30 95% mean confidence interval for tuples %-change: -1.17% -0.95% Tuples are helped. total clauses in shared programs: 27877 -> 27827 (-0.18%) clauses in affected programs: 1556 -> 1506 (-3.21%) helped: 45 HURT: 0 helped stats (abs) min: 1 max: 2 x̄: 1.11 x̃: 1 helped stats (rel) min: 1.43% max: 9.52% x̄: 3.88% x̃: 3.57% 95% mean confidence interval for clauses value: -1.21 -1.02 95% mean confidence interval for clauses %-change: -4.38% -3.39% Clauses are helped. total quadwords in shared programs: 119058 -> 118563 (-0.42%) quadwords in affected programs: 33777 -> 33282 (-1.47%) helped: 250 HURT: 2 helped stats (abs) min: 1 max: 29 x̄: 1.99 x̃: 1 helped stats (rel) min: 0.23% max: 11.11% x̄: 1.67% x̃: 1.40% HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1 HURT stats (rel) min: 1.64% max: 2.00% x̄: 1.82% x̃: 1.82% 95% mean confidence interval for quadwords value: -2.27 -1.66 95% mean confidence interval for quadwords %-change: -1.80% -1.49% Quadwords are helped. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327>
2021-06-11 01:21:28 +01:00
],
capture : true,
depend_files : nir_algebraic_depends,
pan/bi: Add back custom algebraic opts Right now just do a trivial one to test the infrastructure. In the next commit we'll use this for a more interesting optimization that's a bit painful in BIR but trivial with nir_search. total instructions in shared programs: 149566 -> 149562 (<.01%) instructions in affected programs: 502 -> 498 (-0.80%) helped: 3 HURT: 0 helped stats (abs) min: 1 max: 2 x̄: 1.33 x̃: 1 helped stats (rel) min: 0.38% max: 1.30% x̄: 0.97% x̃: 1.21% total tuples in shared programs: 130957 -> 130487 (-0.36%) tuples in affected programs: 54752 -> 54282 (-0.86%) helped: 303 HURT: 2 helped stats (abs) min: 1 max: 29 x̄: 1.56 x̃: 1 helped stats (rel) min: 0.13% max: 7.14% x̄: 1.08% x̃: 0.92% HURT stats (abs) min: 1 max: 2 x̄: 1.50 x̃: 1 HURT stats (rel) min: 1.89% max: 2.99% x̄: 2.44% x̃: 2.44% 95% mean confidence interval for tuples value: -1.79 -1.30 95% mean confidence interval for tuples %-change: -1.17% -0.95% Tuples are helped. total clauses in shared programs: 27877 -> 27827 (-0.18%) clauses in affected programs: 1556 -> 1506 (-3.21%) helped: 45 HURT: 0 helped stats (abs) min: 1 max: 2 x̄: 1.11 x̃: 1 helped stats (rel) min: 1.43% max: 9.52% x̄: 3.88% x̃: 3.57% 95% mean confidence interval for clauses value: -1.21 -1.02 95% mean confidence interval for clauses %-change: -4.38% -3.39% Clauses are helped. total quadwords in shared programs: 119058 -> 118563 (-0.42%) quadwords in affected programs: 33777 -> 33282 (-1.47%) helped: 250 HURT: 2 helped stats (abs) min: 1 max: 29 x̄: 1.99 x̃: 1 helped stats (rel) min: 0.23% max: 11.11% x̄: 1.67% x̃: 1.40% HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1 HURT stats (rel) min: 1.64% max: 2.00% x̄: 1.82% x̃: 1.82% 95% mean confidence interval for quadwords value: -2.27 -1.66 95% mean confidence interval for quadwords %-change: -1.80% -1.49% Quadwords are helped. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327>
2021-06-11 01:21:28 +01:00
)
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, bi_opcodes_c, bi_printer_c, bi_packer_c, bifrost_nir_algebraic_c, valhall_c],
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_panfrost_hw, inc_valhall],
dependencies: [idep_nir, idep_bi_opcodes_h, idep_bi_builder_h, idep_valhall_enums_h],
link_with: [libpanfrost_util, libpanfrost_bifrost_disasm, libpanfrost_valhall_disasm],
c_args : [no_override_init_args],
gnu_symbol_visibility : 'hidden',
build_by_default : false,
)
if with_tests
test(
'bifrost_tests',
executable(
'bifrost_tests',
files(
'test/test-constant-fold.cpp',
'test/test-dual-texture.cpp',
'test/test-lower-swizzle.cpp',
'test/test-message-preload.cpp',
'test/test-optimizer.cpp',
'test/test-pack-formats.cpp',
'test/test-packing.cpp',
'test/test-scheduler-predicates.cpp',
'valhall/test/test-add-imm.cpp',
'valhall/test/test-validate-fau.cpp',
'valhall/test/test-insert-flow.cpp',
'valhall/test/test-lower-isel.cpp',
'valhall/test/test-lower-constants.cpp',
'valhall/test/test-mark-last.cpp',
'valhall/test/test-merge-flow.cpp',
'valhall/test/test-packing.cpp',
),
c_args : [c_msvc_compat_args, no_override_init_args],
gnu_symbol_visibility : 'hidden',
include_directories : [inc_include, inc_src, inc_mesa, inc_valhall],
dependencies: [idep_gtest, idep_nir, idep_bi_opcodes_h, idep_bi_builder_h],
link_with : [libpanfrost_bifrost],
),
suite : ['panfrost'],
protocol : gtest_test_protocol,
)
endif