i965: Don't make instructions with a null dest a barrier to scheduling.
authorMatt Turner <mattst88@gmail.com>
Wed, 9 Apr 2014 20:38:14 +0000 (13:38 -0700)
committerMatt Turner <mattst88@gmail.com>
Sat, 24 Jan 2015 01:57:39 +0000 (17:57 -0800)
commitc638ea3d19d46cfe65739af2c78373146ed50737
treef9ab72543ce5e4a1ccf37da0073ab3229f53b823
parentf02f1af9f7582bc9ca685ef240751aa57ce42638
i965: Don't make instructions with a null dest a barrier to scheduling.

Now that we properly track accumulator dependencies, the scheduler is
able to schedule instructions between the mach and mov in the common
the integer multiplication pattern:

   mul  acc0, x, y
   mach null, x, y
   mov  dest, acc0

Since a null destination implies no dependency on the destination, we
can also safely schedule instructions (that don't write the accumulator)
between the mul and mach.

GAINED:                                103
LOST:                                  43

Causes one program to spill (643 -> 1076 instructions).

I committed this patch last year (commit 42a26cb5) but reverted it
(commit 0d3f83f4) after inexplicable artifacts in Kerbal Space Program
(bug 78648). Tapani reapplied this patch and could not reproduce the bug
with current Mesa.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp