i965/fs: Drop fs_inst::overwrites_reg() in favor of regions_overlap().
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 2 Sep 2016 02:34:18 +0000 (19:34 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 14 Sep 2016 21:50:55 +0000 (14:50 -0700)
commitb42c13a5b8ac7d643bbf4c1592607811a81b4ebb
treef8de2847535fa7899339b11040c6885ec1124d56
parent32d67923b28e55cfe23883510509644e788003f0
i965/fs: Drop fs_inst::overwrites_reg() in favor of regions_overlap().

fs_inst::overwrites_reg is rather easy to misuse because it cannot
tell how large the register region starting at 'reg' is, so in cases
where the destination region starts after 'reg' it may give a
misleading result.  regions_overlap() is somewhat more verbose to use
but handles arbitrary overlap correctly so it should generally be used
instead.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
src/mesa/drivers/dri/i965/brw_fs_cse.cpp
src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp
src/mesa/drivers/dri/i965/brw_ir_fs.h