diff options
author | Francisco Jerez <currojerez@riseup.net> | 2016-09-01 19:34:18 -0700 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2016-09-14 14:50:55 -0700 |
commit | b42c13a5b8ac7d643bbf4c1592607811a81b4ebb (patch) | |
tree | f8de2847535fa7899339b11040c6885ec1124d56 /src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | |
parent | 32d67923b28e55cfe23883510509644e788003f0 (diff) | |
download | external_mesa3d-b42c13a5b8ac7d643bbf4c1592607811a81b4ebb.zip external_mesa3d-b42c13a5b8ac7d643bbf4c1592607811a81b4ebb.tar.gz external_mesa3d-b42c13a5b8ac7d643bbf4c1592607811a81b4ebb.tar.bz2 |
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>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp index 4a56aff..bd534bf 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -161,8 +161,10 @@ fs_copy_prop_dataflow::setup_initial_values() /* Mark ACP entries which are killed by this instruction. */ for (int i = 0; i < num_acp; i++) { - if (inst->overwrites_reg(acp[i]->dst) || - inst->overwrites_reg(acp[i]->src)) { + if (regions_overlap(inst->dst, inst->size_written, + acp[i]->dst, acp[i]->size_written) || + regions_overlap(inst->dst, inst->size_written, + acp[i]->src, acp[i]->size_read)) { BITSET_SET(bd[block->num].kill, i); } } |