aco: reserve 2 sgprs for each branch

Graphics / Mesa 3D Graphics Library / Mesa - Rhys Perry [gmail.com] - 26 August 2020 13:26 UTC

We'll need two sgprs for the possibility of a long jump.

fossil-db (Navi): Totals from 10197 (7.50% of 135946) affected shaders: SGPRs: 946268 -> 946468 (+0.02%)
VGPRs: 705884 -> 707956 (+0.29%); split: -0.00%, +0.30% SpillSGPRs: 31485 -> 36212 (+15.01%); split: -0.04%, +15.05% CodeSize: 88296484 -> 88384604 (+0.10%); split: -0.01%, +0.11% MaxWaves: 81379 -> 81171 (-0.26%) Instrs: 17219111 -> 17231682 (+0.07%); split: -0.03%, +0.10% Cycles: 1594875900 -> 1596450136 (+0.10%); split: -0.05%, +0.15%
VMEM: 1687263 -> 1689080 (+0.11%); split: +0.14%, -0.03% SMEM: 657726 -> 660262 (+0.39%); split: +0.61%, -0.22%
VClause: 294806 -> 294638 (-0.06%); split: -0.08%, +0.02% SClause: 556702 -> 556210 (-0.09%); split: -0.12%, +0.03% Copies: 1466323 -> 1469349 (+0.21%); split: -0.57%, +0.78% Branches: 619793 -> 618556 (-0.20%); split: -0.28%, +0.08% PreSGPRs: 806364 -> 811477 (+0.63%); split: -0.14%, +0.77% PreVGPRs: 655845 -> 657174 (+0.20%)

156fd58cdac aco: reserve 2 sgprs for each branch
src/amd/compiler/aco_builder_h.py | 4 +-
src/amd/compiler/aco_dead_code_analysis.cpp | 2 +-
src/amd/compiler/aco_insert_exec_mask.cpp | 10 ++--
src/amd/compiler/aco_instruction_selection.cpp | 64 +++++++++++++++++---------
src/amd/compiler/aco_lower_to_hw_instr.cpp | 16 +++----
5 files changed, 57 insertions(+), 39 deletions(-)

Upstream: cgit.freedesktop.org


  • Share