Run this pass late (after opt loop) to move load_const instructions back into the basic blocks which use the result, in cases where a load_const is only consumed in a single block.
This helps reduce register usage in cases where the backend driver cannot lower the load_const to a uniform.
7235c144a6 nir: add pass to move load_const
src/compiler/Makefile.sources | 1 +
src/compiler/nir/meson.build | 1 +
src/compiler/nir/nir.h | 1 +
src/compiler/nir/nir_move_load_const.c | 141 +++++++++++++++++++++++++++++++++
4 files changed, 144 insertions(+)