i965/vec4: Calculate register allocation q values manually.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 11 Feb 2015 16:15:44 +0000 (18:15 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Thu, 19 Feb 2015 12:09:12 +0000 (14:09 +0200)
commit6c34fd20beb74e009778870a8e30811b393f745c
treed04b93eec4c9ce12cbdb66807f8248904eeaf539
parent35a77a148f8b7ef03fe3b31d63719e0bfdf4b783
i965/vec4: Calculate register allocation q values manually.

This fixes a regression in the running time of Piglit introduced by
commit 78e9043475d4bed8b50f7e413963c960fa0935bb, which increased the
number of register allocation classes set up by the VEC4 back-end
from 2 to 16.  The algorithm used by ra_set_finalize() to calculate
them is unnecessarily expensive, do it manually like the FS back-end
does.

Reported-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp