freedreno/ir3/sched: avoid scheduling outputs
authorRob Clark <robdclark@chromium.org>
Wed, 6 May 2020 17:20:14 +0000 (10:20 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 13 May 2020 03:28:40 +0000 (03:28 +0000)
commitd95a6e3a0ca2d4a420306dd078cea05d3f21c865
treedfcc6c75e8cec0372de845d47c5e19a40e2432e5
parent488cf208d5d90b0f3b3c346e0abb92e71597202f
freedreno/ir3/sched: avoid scheduling outputs

If an instruction's only use is as an output, and it increases register
pressure, then try to avoid scheduling it until there are no other
options.

A semi-common pattern is `fragcolN.a = 1.0`, this pushes all these
immed loads to the end of the shader.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4923>
src/freedreno/ir3/ir3.h
src/freedreno/ir3/ir3_ra.h
src/freedreno/ir3/ir3_sched.c