register_allocate: don't consider trivially colorable registers for spilling.
authorPaul Berry <stereotype441@gmail.com>
Fri, 28 Sep 2012 21:21:38 +0000 (14:21 -0700)
committerPaul Berry <stereotype441@gmail.com>
Wed, 3 Oct 2012 19:54:42 +0000 (12:54 -0700)
commit551c991606e543c3a264a762026f11348b37947e
tree6c689e266ac9f290a89817e69e22d62f1bc4926d
parent53d06ecdd02d36769cfd3da55d99a569c00b7878
register_allocate: don't consider trivially colorable registers for spilling.

Previously, we considered all registers as candidates for spilling.
This was counterproductive--for any registers that have already been
removed from the interference graph, there is no benefit to spilling
them, since they don't contribute to register pressure.

This patch ensures that we will only try to spill registers that are
still in the interference graph after register allocation has failed.

This is consistent with the recommendations of the paper "Retargetable
Graph-Coloring Register Allocation for Irregular Architectures", on
which our register allocator is based.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/program/register_allocate.c