• Timothy Arceri's avatar
    nir: remove restrictions on opt_if_loop_last_continue() · 38c04e1f
    Timothy Arceri authored
    When I implemented opt_if_loop_last_continue() I had restricted
    this pass from moving other if-statements inside the branch opposite
    the continue. At the time it was causing extra regisiter pressure
    in some shaders, however that no longer seems to be an issue.
    
    Samuel Pitoiset noticed that making this pass more aggressive
    significantly improved the performance of Doom on RADV. Below are
    the statistics he gathered.
    
    28717 shaders in 14931 tests
    Totals:
    SGPRS: 1267317 -> 1267549 (0.02 %)
    VGPRS: 896876 -> 895920 (-0.11 %)
    Spilled SGPRs: 24701 -> 26367 (6.74 %)
    Code Size: 48379452 -> 48507880 (0.27 %) bytes
    Max Waves: 241159 -> 241190 (0.01 %)
    
    Totals from affected shaders:
    SGPRS: 23584 -> 23816 (0.98 %)
    VGPRS: 25908 -> 24952 (-3.69 %)
    Spilled SGPRs: 503 -> 2169 (331.21 %)
    Code Size: 2471392 -> 2599820 (5.20 %) bytes
    Max Waves: 586 -> 617 (5.29 %)
    
    The codesize increases is related to Wolfenstein II.
    
    This gives +10% FPS with Doom on my Vega56.
    
    Rhys Perry also benchmarked Doom on his VEGA64:
    
    Before: 72.53 FPS
    After:  80.77 FPS
    38c04e1f
Name
Last commit
Last update
.gitlab-ci Loading commit data...
bin Loading commit data...
build-support Loading commit data...
docs Loading commit data...
doxygen Loading commit data...
include Loading commit data...
m4 Loading commit data...
scons Loading commit data...
scripts Loading commit data...
src Loading commit data...
.dir-locals.el Loading commit data...
.editorconfig Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
Android.common.mk Loading commit data...
Android.mk Loading commit data...
CleanSpec.mk Loading commit data...
Makefile.am Loading commit data...
README.rst Loading commit data...
REVIEWERS Loading commit data...
SConstruct Loading commit data...
VERSION Loading commit data...
appveyor.yml Loading commit data...
autogen.sh Loading commit data...
common.py Loading commit data...
configure.ac Loading commit data...
install-gallium-links.mk Loading commit data...
install-lib-links.mk Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...