i965/fs: Only sweep NOPs if register coalescing made progress.

Otherwise there's nothing to do.
This commit is contained in:
Matt Turner 2014-04-15 16:28:04 -07:00
parent 7ae870211d
commit f092e8951c
1 changed files with 8 additions and 7 deletions

View File

@ -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;
}