i965/fs: Simplify instruction rewrite loop in the register coalesce pass.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 28 Jul 2015 09:07:56 +0000 (12:07 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 29 Jul 2015 11:12:45 +0000 (14:12 +0300)
commit24d74b66883da1955f8c2223367d41470d99df6d
tree7827e3922b97b0117f0ce9fc7a56060637a4b936
parent170200e0fcb0b16d20bff86e1258e0a1b2034c10
i965/fs: Simplify instruction rewrite loop in the register coalesce pass.

For some reason the loop that rewrites all occurrences of the
coalesced register was iterating over all possible offsets until it
would find one that compares equal to the offset of a source or
destination of any instruction in the program.  Since the mapping
between old and new offsets is already available in the regs_to_offset
array and we know that the whole register has been coalesced we can
just look it up.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp