On Tue, 30 Aug 2011 16:28:43 -0700, Kenneth Graunke <kenn...@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.
pgpZrxrrtCmic.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev