pan/bi: Dead code eliminate per-channel
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 5 Feb 2021 22:58:46 +0000 (17:58 -0500)
committerMarge Bot <eric+marge@anholt.net>
Mon, 8 Feb 2021 14:07:29 +0000 (14:07 +0000)
commitb8f042c9bb0e1c6de684222d301084e5e2b17c3e
tree3db34b635b30ee1950f1096edeb8c9cb02d2dca9
parent08d98290feb67ec71e0944c1ce3f6deffa53a156
pan/bi: Dead code eliminate per-channel

We already track the full liveness so this is a trivial optimization,
with an especial win for shaders reading only a subset of components of
gl_FragCoord.

More importantly, it's required for proper scheduling (in soft mode)
when vectors are used and some (but not all components) are promoted to
temporary registers.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8354>
src/panfrost/bifrost/bi_opt_dce.c