[Mesa-dev] [PATCH v2 3/4] ra: consider all spillable nodes for spilling

Eric Anholt eric at anholt.net
Wed Jul 30 22:50:59 PDT 2014


Connor Abbott <cwabbott0 at gmail.com> writes:

> Before, we would only consider nodes for spilling if they were
> optimistically pushed onto the stack. But the logic for this was
> complicated, and duplicated some things; also, we might want to spill
> nodes that are not optimistically colored if our heuristic says we
> should. This becomes a problem especially after the next commit, where
> duplicating the current behavior of only spilling optimistically colored
> nodes can sometimes leave the backend in a position where it has no
> registers to spill. So just drop the original logic, and consider
> everything that has its spill cost set for spilling.
>
> HURT:   shaders/steam/dungeon-defenders/5008.shader_test SIMD8: 434 -> 439 (1.15%)
>
> total instructions in shared programs: 4547617 -> 4547622 (0.00%)
> instructions in affected programs:     434 -> 439 (1.15%)
> GAINED:                                0
> LOST:                                  0

Interesting.  Is this our only shader that's spilling in the db?
(though, also, something spilling that's only 434 instructions long?  I
don't think I've ever seen that.  Wow.).  Sometimes for poking at this
kind of stuff I'll just reduce the maximum number of registers I let the
allocator handle, so that I have more spilling shaders to look at.

I think this change is a bad idea.  If the register was trivially
colorable, then you don't want to spill it -- it won't help solve your
inability to color whatever node you failed to allocate last time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140730/bb01761c/attachment.sig>


More information about the mesa-dev mailing list