radeonsi: call nir_split_array_vars/shrink_vec_array_vars/opt_find_array_copies

Loosely based on RADV and https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5668

54793 shaders in 33659 tests
Totals:
SGPRS: 2739498 -> 2739474 (-0.00 %)
VGPRS: 1534120 -> 1534256 (0.01 %)
Spilled SGPRs: 2579 -> 2579 (0.00 %)
Spilled VGPRs: 29 -> 29 (0.00 %)
Private memory VGPRs: 2176 -> 256 (-88.24 %)
Scratch size: 2220 -> 288 (-87.03 %) dwords per thread
Code Size: 55572924 -> 55584592 (0.02 %) bytes
LDS: 92 -> 92 (0.00 %) blocks
Max Waves: 966044 -> 966021 (-0.00 %)
Wait states: 0 -> 0 (0.00 %)

Totals from affected shaders:
SGPRS: 7272 -> 7248 (-0.33 %)
VGPRS: 4848 -> 4984 (2.81 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 2176 -> 256 (-88.24 %)
Scratch size: 2188 -> 256 (-88.30 %) dwords per thread
Code Size: 336332 -> 348000 (3.47 %) bytes
LDS: 18 -> 18 (0.00 %) blocks
Max Waves: 2659 -> 2636 (-0.86 %)
Wait states: 0 -> 0 (0.00 %)

|   PERCENTAGE DELTAS    |  Shaders |    SGPRs |    VGPRs |SpillSGPR |SpillVGPR | PrivVGPR |  Scratch | CodeSize | MaxWaves |    Waits |
|------------------------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|
| 0ad                    |         6|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| alien_isolation        |      2936|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| anholt                 |        10|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| antichamber            |       180|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| batman_arkham_origins  |       589|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| bioshock-infinite      |      1769|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| borderlands2           |      3968|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| borderlands_presequel  |      1326|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| brutal-legend          |       338|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| chromeos               |        86|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| chromium               |         2|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| civilization_beyond..  |       116|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| company_of_heroes2     |       240|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| counter_strike_glob..  |      1142|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| deadcore               |        76|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| deus_ex_mankind_div..  |      1410|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| dirt-showdown          |       533|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| dirt_rally             |       364|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| divinity               |      1052|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| dolphin                |        22|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| dota2                  |      1747|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| europa_universalis_4   |        76|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| f1-2015                |       775|    0.02 %|    0.12 %|    .     |    .     | -100.00 %| -100.00 %|    0.19 %|   -0.04 %|    .     |
| furmark-0.7.0          |         4|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| gimark-0.7.0           |        10|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| glamor                 |        16|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| glmark                 |        96|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| grid_autosport         |      1767|   -0.03 %|    0.17 %|    .     |    .     |  -85.52 %|  -84.44 %|    0.40 %|   -0.03 %|    .     |
| hitman                 |      1413|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| humus-celshading       |         4|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| humus-domino           |         6|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| humus-dynamicbranching |        24|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| humus-hdr              |        10|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| humus-portals          |         2|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| humus-volumetricfog..  |         6|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| left_4_dead_2          |      1762|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| legend_of_grimrock     |       100|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| life_is_strange        |      1296|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| mad_max                |       358|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| many-spheres           |         6|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| metro_2033_redux       |      2670|    .     |    0.02 %|    .     |    .     |    .     |    .     |    .     |   -0.02 %|    .     |
| nexuiz                 |        80|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| payday2                |      1362|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| pixmark-julia-fp32     |         2|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| pixmark-julia-fp64     |         2|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| pixmark-piano-0.7.0    |         2|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| pixmark-volplosion-..  |         2|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| plot3d-0.7.0           |         8|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| portal                 |       474|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| reflections_subway     |        98|    .     |    .     |    .     |    .     |    .     |    .     |    0.02 %|    .     |    .     |
| rocket_league          |       494|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| saints_row_iv          |      1704|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| saints_row_the_third   |       671|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| sauerbraten            |         7|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| scifi_hallway          |        98|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| serious_sam_3_bfe      |       392|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| shadow_of_mordor       |      1410|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| shadow_warrior         |      3956|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| skia                   |      6094|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| sun_temple             |       109|    .     |    .     |    .     |    .     |    .     |    .     |    0.01 %|    .     |    .     |
| supertuxkart           |         4|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| talos_principle        |       324|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| team_fortress_2        |       808|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| tesseract              |       430|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| tessmark-0.7.0         |         6|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| thea                   |       172|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| tomb_raider            |      1448|   -0.02 %|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| total_war_warhammer    |       242|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| ubershaders            |        54|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| ue4_effects_cave       |       290|    .     |    .     |    .     |    .     |    .     |    .     |    0.02 %|    .     |    .     |
| ue4_elemental          |       561|    .     |    .     |    .     |    .     |    .     |    .     |    0.02 %|    .     |    .     |
| ue4_lightroom_inter..  |        64|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| ue4_realistic_rende..  |        86|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| unigine_heaven         |       322|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| unigine_sanctuary      |       264|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| unigine_tropics        |       210|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| unigine_valley         |       278|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| unity                  |        72|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| victor_vran            |      1262|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| warsow                 |       176|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| warzone2100            |         4|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| wasteland2             |        76|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| wavelet-volume         |         4|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| witcher2               |      1040|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| xcom_enemy_within      |      1236|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| yofrankie              |        82|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
|------------------------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|
| All affected           |       157|   -0.33 %|    2.81 %|    .     |    .     |  -88.24 %|  -88.30 %|    3.47 %|   -0.86 %|    .     |
|------------------------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|
| Total                  |     54793|    .     |    .     |    .     |    .     |  -88.24 %|  -87.03 %|    0.02 %|    .     |    .     |

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5750>
1 file changed