freedreno/ir3: eliminate unused false-deps
authorRob Clark <robdclark@gmail.com>
Tue, 6 Mar 2018 14:53:45 +0000 (09:53 -0500)
committerRob Clark <robdclark@gmail.com>
Sat, 31 Mar 2018 19:11:46 +0000 (15:11 -0400)
commitbd2ca2bcddaf1d598dfa29a5bee661d7315e573a
treeb0e0ff4f0baaa976056e1572d0a66f31152cbe7d
parent4f783838099eec11d38a13dd021d500d812cf410
freedreno/ir3: eliminate unused false-deps

Previously false-dependencies would get flagged as used, even if the
only "use" was a false dep to (for example) prevent a load from being
scheduled after a store.

In addition to being pointless instructions, in some cases they can
cause problems.  For example, ldg (and similar instructions) depend on
an immed arg getting CP'd into the instruction, but this doesn't happen
if an instruction is otherwise unused.  Which can result in undefined
results (overwriting unintended registers).

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/ir3/ir3_cp.c
src/gallium/drivers/freedreno/ir3/ir3_depth.c