OSDN Git Service

nir/live_variables: Use a worklist
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 19 Dec 2014 19:49:58 +0000 (11:49 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 16 Jan 2015 00:54:21 +0000 (16:54 -0800)
commitbc6e57e019bd2399a70acabcad21217aadf2944c
tree403d3f3648d063a552402f29987f7a5204a1b72f
parent4839d1aed167d904ebd5827d7c01d87ad5b0fca1
nir/live_variables: Use a worklist

This is a rework of the liveness algorithm using a worklist as suggested by
Connor.  Doing so reduces the number of times we walk over the instructions
because we don't have to do an entire pointless walk over the instructions
just to figure out it's time to stop.  Also, the stuff after the last loop
in the funciton will only ever get visited once.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir_live_variables.c