From 88a146ebf315e4e4279a36d5c097e7f578458db2 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 20 Oct 2020 15:51:07 -0700 Subject: intel/compiler: Enable GCM for scalar vertex stage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Dolphin übershaders are really, really hurt for spills and fills. Ice Lake total instructions in shared programs: 19796851 -> 19770546 (-0.13%) instructions in affected programs: 553371 -> 527066 (-4.75%) helped: 1508 HURT: 4 helped stats (abs) min: 1 max: 554 x̄: 17.45 x̃: 7 helped stats (rel) min: 0.23% max: 35.20% x̄: 3.57% x̃: 2.69% HURT stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1 HURT stats (rel) min: 2.56% max: 2.56% x̄: 2.56% x̃: 2.56% 95% mean confidence interval for instructions value: -20.01 -14.79 95% mean confidence interval for instructions %-change: -3.76% -3.34% Instructions are helped. total cycles in shared programs: 488466944 -> 491159514 (0.55%) cycles in affected programs: 14670824 -> 17363394 (18.35%) helped: 1189 HURT: 392 helped stats (abs) min: 1 max: 4646 x̄: 48.59 x̃: 26 helped stats (rel) min: 0.03% max: 46.59% x̄: 3.75% x̃: 2.33% HURT stats (abs) min: 1 max: 138856 x̄: 7016.20 x̃: 11 HURT stats (rel) min: <.01% max: 167.27% x̄: 8.66% x̃: 0.88% 95% mean confidence interval for cycles value: 1031.02 2375.14 95% mean confidence interval for cycles %-change: -1.29% -0.06% Inconclusive result (value mean confidence interval and %-change mean confidence interval disagree). total spills in shared programs: 10963 -> 14551 (32.73%) spills in affected programs: 168 -> 3756 (2135.71%) helped: 0 HURT: 27 total fills in shared programs: 11241 -> 16836 (49.77%) fills in affected programs: 276 -> 5871 (2027.17%) helped: 0 HURT: 27 total sends in shared programs: 1015255 -> 1014814 (-0.04%) sends in affected programs: 2200 -> 1759 (-20.05%) helped: 107 HURT: 0 helped stats (abs) min: 1 max: 12 x̄: 4.12 x̃: 3 helped stats (rel) min: 3.85% max: 42.86% x̄: 17.91% x̃: 14.29% 95% mean confidence interval for sends value: -4.91 -3.34 95% mean confidence interval for sends %-change: -20.15% -15.66% Sends are helped. --- src/intel/compiler/brw_nir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 245003c8dbb..065dd7c1b9e 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -565,6 +565,9 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler, OPT(nir_opt_cse); OPT(nir_opt_combine_stores, nir_var_all); + if (is_scalar && nir->info.stage == MESA_SHADER_VERTEX) + OPT(nir_opt_gcm, true); + /* Passing 0 to the peephole select pass causes it to convert * if-statements that contain only move instructions in the branches * regardless of the count. -- cgit v1.2.3