i965/fs: Only sweep NOPs if register coalescing made progress.
Otherwise there's nothing to do.
This commit is contained in:
parent
7ae870211d
commit
f092e8951c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue