i965/fs: Skip gen4 pre/post-send dependency workaronds for the first/last block.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 25 May 2016 21:21:49 +0000 (14:21 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 30 May 2016 06:41:38 +0000 (23:41 -0700)
commit4decc426c26a86beb76dc48658ce175d051464c2
treeef7ec482477c9ba1fbdb925348b2a1140464354e
parentdaf4a71883bffcedaf27ff046a1ddd4af9d41f7f
i965/fs: Skip gen4 pre/post-send dependency workaronds for the first/last block.

We know that there cannot be any destination dependency race if we
reach the beginning or end of the program without having found any
other instruction the send could possibly race with.  This avoids
emitting a pile of useless moves at the beginning or end of the
program in the most common case in which the program has a single
basic block only.

On the original i965 I get the following shader-db results:

 total instructions in shared programs: 3354165 -> 3215637 (-4.13%)
 instructions in affected programs: 3183065 -> 3044537 (-4.35%)
 helped: 13498
 HURT: 0

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_fs.cpp