[Bug 77740] i965: Relax accumulator dependency scheduling on Gen < 6

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 24 01:24:55 PDT 2014


--- Comment #1 from Iago Toral <itoral at igalia.com> ---
There seems to be a 'writes_accumulator' flag that is set to TRUE for
instructions that are known to write to the accumulator. The scheduling code
currently checks this flag on Gen >= 6 to compute dependencies among
instruction that read/write the accumulator.

For Gen < 6, there seems that for some very specific cases where this flag is
set to TRUE even if the scheduling code is not going to use it. As far as I can
see this is because the 'writes_accumulator' flag can also be used in the
optimization passes to remove dead code (and we don't want to eliminate code
that writes to the accumulator values that we intend to use).

So, I think for this task the 'writes_accumulator' flag alone is not enough: in
the scheduling code we need to know if the instruction can write to the
accumulator independently of whether we are expecting to use that value or not
and in Gen < 6, as far as I can see, there is a bunch of operations that can
write implicitly to the accumulator (mostly opcodes > 63).

I think the way to go about this would be to have:

bool instruction_backend::writes_accumulator_implicitly(int gen);

that we can call from the scheduling code to know if a particular instruction
can write implicitly  to the accumulator. In Gen >= 6, it would simply return
the value of 'writes_accumulator' but for Gen < 6 it would check also the

I think with that operation in place we could unify the scheduling code paths
for all Gens.

I'll write a patch for this but I will need help with the testing since I am
running on Gen 7.

You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20140424/004d9aed/attachment-0001.html>

More information about the intel-3d-bugs mailing list