Skip to content

nouveau/nir: Enable nir_opt_move/sink.

Emma Anholt requested to merge anholt/mesa:nouveau-nir-sink into main

NIR load_consts/inputs tend to happen together at the top of the program. In the TGSI backend the loads got emitted at use time, while the NIR backend was emitting the loads at load intrinsic time. By sinking the intrinsics, we can greatly reduce register pressure.

nv92 NIR results:

total local in shared programs: 2024 -> 2020 (-0.20%)
local in affected programs: 4 -> 0
total gpr in shared programs: 790424 -> 735455 (-6.95%)
gpr in affected programs: 215968 -> 160999 (-25.45%)
total instructions in shared programs: 6058339 -> 6051208 (-0.12%)
instructions in affected programs: 410795 -> 403664 (-1.74%)
total bytes in shared programs: 41820104 -> 41660304 (-0.38%)
bytes in affected programs: 7147296 -> 6987496 (-2.24%)
Edited by Emma Anholt

Merge request reports