gm107/ir: prevent WaW hazards in instruction scheduling
authorRhys Perry <pendingchaos02@gmail.com>
Sat, 19 May 2018 21:03:39 +0000 (22:03 +0100)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 28 May 2018 17:59:56 +0000 (13:59 -0400)
commit57e721a45693e510c6ec25b37ec0ccd23d434553
tree0014a5b6a780ba99c75df78bcbdb22d39ce228d0
parenta29bc043ae8cf145bdf24b65c9e47c2aa614152f
gm107/ir: prevent WaW hazards in instruction scheduling

Previously, findFirstUse() only considered reads "uses". This fixes that
by making it check both an instruction's sources and definitions. It
also shortens both findFistUse() and findFirstDef() along the way.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp