Skip to content

nir/loop_unroll: unroll more aggressively if it can improve load scheduling

Rhys Perry requested to merge pendingchaos/mesa:nir_unroll_load_sched into master

Significantly improves performance of a Control compute shader. Also seems to increase FPS at the very start of the game by ~5% (RX 580, 1080p, medium settings, no MSAA).

fossil-db (Navi):

Totals from 60 (0.04% of 135946) affected shaders:
SGPRs: 3040 -> 3360 (+10.53%); split: -1.58%, +12.11%
VGPRs: 2560 -> 3072 (+20.00%)
CodeSize: 184216 -> 473660 (+157.12%)
MaxWaves: 820 -> 646 (-21.22%)
Instrs: 36322 -> 88749 (+144.34%)
Cycles: 440036 -> 462320 (+5.06%); split: -24.33%, +29.39%
VMEM: 16374 -> 45507 (+177.92%); split: +181.84%, -3.92%
SMEM: 3895 -> 4971 (+27.63%); split: +33.89%, -6.26%
VClause: 1074 -> 3754 (+249.53%); split: -1.21%, +250.74%
SClause: 996 -> 1665 (+67.17%); split: -1.91%, +69.08%
Copies: 5187 -> 8736 (+68.42%); split: -1.45%, +69.87%
Branches: 613 -> 572 (-6.69%); split: -21.70%, +15.01%
PreSGPRs: 1927 -> 2048 (+6.28%); split: -2.39%, +8.67%
PreVGPRs: 2139 -> 2289 (+7.01%); split: -0.56%, +7.57%

Signed-off-by: Rhys Perry pendingchaos02@gmail.com

Merge request reports

Loading