summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-04-15 16:28:04 -0700
committerMatt Turner <mattst88@gmail.com>2014-04-15 16:28:04 -0700
commitf092e8951ce5212ba3cbb382ce3a6666eb6c9bed (patch)
tree18e7ee9f35ffbc3e4f50da3c8a757a0a8a116b19 /src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
parent7ae870211ddc40ef6ed209a322c3a721214bb737 (diff)
downloadexternal_mesa3d-f092e8951ce5212ba3cbb382ce3a6666eb6c9bed.zip
external_mesa3d-f092e8951ce5212ba3cbb382ce3a6666eb6c9bed.tar.gz
external_mesa3d-f092e8951ce5212ba3cbb382ce3a6666eb6c9bed.tar.bz2
i965/fs: Only sweep NOPs if register coalescing made progress.
Otherwise there's nothing to do.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp15
1 files changed, 8 insertions, 7 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 4e3b611..d5dd2c2 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
@@ -215,17 +215,18 @@ fs_visitor::register_coalesce()
reg_from = -1;
}
- foreach_list_safe(node, &this->instructions) {
- fs_inst *inst = (fs_inst *)node;
+ if (progress) {
+ foreach_list_safe(node, &this->instructions) {
+ fs_inst *inst = (fs_inst *)node;
- if (inst->opcode == BRW_OPCODE_NOP) {
- inst->remove();
- progress = true;
+ if (inst->opcode == BRW_OPCODE_NOP) {
+ inst->remove();
+ progress = true;
+ }
}
- }
- if (progress)
invalidate_live_intervals();
+ }
return progress;
}