[Mesa-dev] [RFC PATCH] i965/fs: Don't coalesce registers into smaller registers.
eric at anholt.net
Tue Aug 30 18:32:41 PDT 2011
On Tue, 30 Aug 2011 16:28:43 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> If we detect MOV X Y, register coalescing tries to rewrite future
> instructions that use X to use Y instead. However, if Y is smaller
> than X, coalescing could get us into trouble.
I actually don't think this is a problem -- note that we're eliminating
one MOV of a component of a GRF, and replacing all references to that
result register with references to the source. This is just badly-named
copy propagation, with dead code elimination hidden inside.
This is not what I want from register coalescing really. Basically,
flip the code around: Find a MOV, find where nobody else writes to its
dest or reads/writes its source, and then rewrite previous instructions
to put results into the MOV's destination register, instead of rewriting
later instructions to get results from the MOV's source register. The
ir_assignment rhs-to-lhs is a special case of that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the mesa-dev