v3d: Implement a small immediates optimization, based on VC4's.
authorEric Anholt <eric@anholt.net>
Fri, 20 Jul 2018 21:27:09 +0000 (14:27 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 23 Jul 2018 17:21:43 +0000 (10:21 -0700)
commit6b73a97f84f86f4c3d3bbbbadf963c20b8e52b57
tree6c8701d6c84c1478f7e829a08e5bb141777846e5
parent79e0f042bcd6a1956015cf332c2232ade2c2321f
v3d: Implement a small immediates optimization, based on VC4's.

We can do one per instruction, and we have to be careful not to overwrite
raddr_b, but this greatly reduces the pressure on uniform loads
(particularly around ldvpm/stvpm instructions).

total instructions in shared programs: 90768 -> 88220 (-2.81%)
instructions in affected programs:     82711 -> 80163 (-3.08%)
src/broadcom/Makefile.sources
src/broadcom/compiler/meson.build
src/broadcom/compiler/qpu_schedule.c
src/broadcom/compiler/v3d_compiler.h
src/broadcom/compiler/vir.c
src/broadcom/compiler/vir_dump.c
src/broadcom/compiler/vir_opt_small_immediates.c [new file with mode: 0644]
src/broadcom/compiler/vir_to_qpu.c