i965/vec4: Reduce working set size of live variables computation.
authorEric Anholt <eric@anholt.net>
Mon, 21 Oct 2013 17:57:29 +0000 (10:57 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 29 Oct 2013 07:27:35 +0000 (00:27 -0700)
commit415d6dc5bd6915b0c17a1df0f9bd0ef4ca534a81
tree7bbe735da9c6ae336d97f7f49864737a618a44fe
parent8bd4476010444642cff71e64146c91a484238dc2
i965/vec4: Reduce working set size of live variables computation.

Orbital Explorer was generating a 4000 instruction geometry shader, which
was taking 275 trips through dead code elimination and register
coalescing, each of which updated live variables to get its work done, and
invalidated those live variables afterwards.

By using bitfields instead of bools (reducing the working set size by a
factor of 8) in live variables analysis, it drops from 88% of the profile
to 57%, and reduces overall runtime from I-got-bored-and-killed-it (Paul
says 3+ minutes) to 10.5 seconds.

Compare to f179f419d1d0a03fad36c2b0a58e8b853bae6118 on the FS side.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp
src/mesa/drivers/dri/i965/brw_vec4_live_variables.h