summaryrefslogtreecommitdiff
path: root/src/mesa/program/register_allocate.c
AgeCommit message (Collapse)Author
2011-01-31Convert everything from the talloc API to the ralloc API.Kenneth Graunke
2011-01-21ra: Use the same context when realloc'ing arrays.Kenneth Graunke
The original allocations use regs->regs as the context, so talloc will happily ignore the context given here. Change it to match to clarify that it isn't changing.
2011-01-18ra: Take advantage of the adjacency list in finding a node to spill.Eric Anholt
This revealed a bug in ra_get_spill_benefit where we only considered the benefit of the first adjacency we were to remove, explaining some of the ugly spilling I've seen in shaders. Because of the reduced spilling, it reduces the runtime of glsl-fs-convolution-1 36.9% +/- 0.9% (n=5).
2011-01-18ra: Remove unused "name" field in regs.Eric Anholt
2011-01-18ra: Take advantage of the adjacency list in ra_select() too.Eric Anholt
Reduces runtime of glsl-fs-convolution-1 another 13.9% +/- 0.6% (n=5).
2011-01-18ra: Add an adjacency list to trade space for time in ra_simplify().Eric Anholt
This was recommended in the original paper, but I figued "make it run" before "make it fast". Now we make it fast. Reduces the runtime of glsl-fs-convolution-1 by 12.7% +/- 0.6% (n=5).
2011-01-18ra: Trade off some space to get time efficiency in ra_set_finalize().Eric Anholt
Our use of the register allocator in i965 is somewhat unusual. Whereas most architectures would have a smaller set of registers with fewer register classes and reuse that across compilation, we have 1, 2, and 4-register classes (usually) and a variable number up to 128 registers per compile depending on how many setup parameters and push constants are present. As a result, when compiling large numbers of programs (as with glean texCombine going through ff_fragment_shader), we spent much of our CPU time in computing the q[] array. By keeping a separate list of what the conflicts are for a particular reg, we reduce glean texCombine time 17.0% +/- 2.3% (n=5). We don't expect this optimization to be useful for 915, which will have a constant register set, but it would be useful if we were switch to this register allocator for Mesa IR.
2010-10-22mesa: move declaration before codeBrian Paul
2010-10-21i965: Add support for register spilling.Eric Anholt
It can be tested with if (0) replaced with if (1) to force spilling for all virtual GRFs. Some simple tests work, but large texturing tests fail.
2010-09-29ra: First cut at a graph-coloring register allocator for mesa.Eric Anholt
Notably missing is choice of registers to spill.