mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 05:00:09 +01:00
nir/algebraic: add is_used_once to dot product reassociation optimization
This improves register usage. fossil-db (Sienna Cichlid, on top of !9805): Totals from 4317 (2.88% of 149839) affected shaders: VGPRs: 352592 -> 351704 (-0.25%); split: -1.48%, +1.23% SpillSGPRs: 182 -> 248 (+36.26%) CodeSize: 31601192 -> 31587624 (-0.04%); split: -0.09%, +0.04% MaxWaves: 56964 -> 57298 (+0.59%); split: +2.48%, -1.90% Instrs: 5973557 -> 5974122 (+0.01%); split: -0.05%, +0.06% Latency: 72088175 -> 72253033 (+0.23%); split: -0.36%, +0.59% InvThroughput: 14978160 -> 14798919 (-1.20%); split: -1.29%, +0.09% VClause: 100994 -> 98645 (-2.33%); split: -3.05%, +0.73% SClause: 278206 -> 276820 (-0.50%); split: -0.54%, +0.04% Copies: 200264 -> 199556 (-0.35%); split: -1.17%, +0.82% Branches: 86410 -> 85930 (-0.56%); split: -0.56%, +0.01% PreSGPRs: 207355 -> 207759 (+0.19%); split: -0.00%, +0.20% PreVGPRs: 314646 -> 310911 (-1.19%); split: -1.35%, +0.17% Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8056>
This commit is contained in:
parent
f95a16be72
commit
4ec4d862c2
1 changed files with 3 additions and 3 deletions
|
|
@ -2388,11 +2388,11 @@ late_optimizations = [
|
|||
# optimization in these stages. See bugzilla #111490. In tessellation
|
||||
# stages applications seem to use 'precise' when necessary, so allow the
|
||||
# optimization in those stages.
|
||||
(('~fadd', ('ffma(is_used_once)', a, b, ('ffma', c, d, ('fmul', 'e(is_not_const_and_not_fsign)', 'f(is_not_const_and_not_fsign)'))), 'g(is_not_const)'),
|
||||
(('~fadd', ('ffma(is_used_once)', a, b, ('ffma', c, d, ('fmul(is_used_once)', 'e(is_not_const_and_not_fsign)', 'f(is_not_const_and_not_fsign)'))), 'g(is_not_const)'),
|
||||
('ffma', a, b, ('ffma', c, d, ('ffma', e, 'f', 'g'))), '(info->stage != MESA_SHADER_VERTEX && info->stage != MESA_SHADER_GEOMETRY) && !options->intel_vec4'),
|
||||
(('~fadd', ('ffma(is_used_once)', a, b, ('fmul', 'c(is_not_const_and_not_fsign)', 'd(is_not_const_and_not_fsign)') ), 'e(is_not_const)'),
|
||||
(('~fadd', ('ffma(is_used_once)', a, b, ('fmul(is_used_once)', 'c(is_not_const_and_not_fsign)', 'd(is_not_const_and_not_fsign)') ), 'e(is_not_const)'),
|
||||
('ffma', a, b, ('ffma', c, d, e)), '(info->stage != MESA_SHADER_VERTEX && info->stage != MESA_SHADER_GEOMETRY) && !options->intel_vec4'),
|
||||
(('~fadd', ('fneg', ('ffma(is_used_once)', a, b, ('ffma', c, d, ('fmul', 'e(is_not_const_and_not_fsign)', 'f(is_not_const_and_not_fsign)')))), 'g(is_not_const)'),
|
||||
(('~fadd', ('fneg', ('ffma(is_used_once)', a, b, ('ffma', c, d, ('fmul(is_used_once)', 'e(is_not_const_and_not_fsign)', 'f(is_not_const_and_not_fsign)')))), 'g(is_not_const)'),
|
||||
('ffma', ('fneg', a), b, ('ffma', ('fneg', c), d, ('ffma', ('fneg', e), 'f', 'g'))), '(info->stage != MESA_SHADER_VERTEX && info->stage != MESA_SHADER_GEOMETRY) && !options->intel_vec4'),
|
||||
|
||||
# Section 8.8 (Integer Functions) of the GLSL 4.60 spec says:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue