freedreno/ir3: Use nir_opt_offset for removing constant adds for shared vars.
authorEmma Anholt <emma@anholt.net>
Thu, 2 Dec 2021 18:31:57 +0000 (10:31 -0800)
committerMarge Bot <emma+marge@anholt.net>
Sun, 16 Jan 2022 19:11:29 +0000 (19:11 +0000)
commitb024102d7c2959451bfef323432beaa4dca4dd88
treea9d60d6075040e7e38550f6ca3e8cefcf957d9c3
parent9645fa9107916287bad05afda7443a016dec2767
freedreno/ir3: Use nir_opt_offset for removing constant adds for shared vars.

Saves some work in carchase and manhattan31:

instructions in affected programs: 2842 -> 2818 (-0.84%)
nops in affected programs: 1131 -> 1105 (-2.30%)
non-nops in affected programs: 1236 -> 1238 (0.16%)
mov in affected programs: 57 -> 61 (7.02%)
dwords in affected programs: 2144 -> 2150 (0.28%)
cat0 in affected programs: 1195 -> 1169 (-2.18%)
cat1 in affected programs: 151 -> 155 (2.65%)
cat2 in affected programs: 142 -> 140 (-1.41%)
sstall in affected programs: 190 -> 178 (-6.32%)
(ss) in affected programs: 63 -> 63 (0.00%)
systall in affected programs: 532 -> 511 (-3.95%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14023>
src/compiler/nir/nir_opt_offsets.c
src/freedreno/ir3/ir3_nir.c