summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
index c71fd47bbe7..6e30d16816d 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
@@ -169,11 +169,8 @@ fs_visitor::register_coalesce()
if (!can_coalesce)
continue;
- bool removed = false;
for (int i = 0; i < src_size; i++) {
if (mov[i]) {
- removed = true;
-
mov[i]->opcode = BRW_OPCODE_NOP;
mov[i]->conditional_mod = BRW_CONDITIONAL_NONE;
mov[i]->dst = reg_undef;
@@ -206,17 +203,15 @@ fs_visitor::register_coalesce()
}
}
- if (removed) {
- for (int i = 0; i < src_size; i++) {
- live_intervals->start[var_to[i]] =
- MIN2(live_intervals->start[var_to[i]],
- live_intervals->start[var_from[i]]);
- live_intervals->end[var_to[i]] =
- MAX2(live_intervals->end[var_to[i]],
- live_intervals->end[var_from[i]]);
- reg_from = -1;
- }
+ for (int i = 0; i < src_size; i++) {
+ live_intervals->start[var_to[i]] =
+ MIN2(live_intervals->start[var_to[i]],
+ live_intervals->start[var_from[i]]);
+ live_intervals->end[var_to[i]] =
+ MAX2(live_intervals->end[var_to[i]],
+ live_intervals->end[var_from[i]]);
}
+ reg_from = -1;
}
foreach_list_safe(node, &this->instructions) {