i965: Relax restriction on scheduling last instruction.
authorMatt Turner <mattst88@gmail.com>
Mon, 15 Feb 2016 18:05:33 +0000 (10:05 -0800)
committerMatt Turner <mattst88@gmail.com>
Thu, 31 Mar 2016 02:54:30 +0000 (19:54 -0700)
commit7b208a731277b4b99b86af3df98c1219099036d7
treef5b3fc8a4fe65e3e7b36cfba605716cfbd5a6e16
parentf60750968c66f7aa15181c4ba315bb594e615044
i965: Relax restriction on scheduling last instruction.

I think when this code was written, basic blocks were always ended by a
control flow instruction or an end-of-thread message. That's no longer
the case, and removing this restriction actually helps things:

   instructions in affected programs: 7267 -> 7244 (-0.32%)
   helped: 4

   total cycles in shared programs: 66559580 -> 66431900 (-0.19%)
   cycles in affected programs: 28310152 -> 28182472 (-0.45%)
   helped: 9577
   HURT: 879

   GAINED: 2

The addition of the is_control_flow() checks is not a functional change,
since the add_insts_from_block() does not put them in the list of
instructions to schedule. I plan to change this in a later patch.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp