From: Matt Turner Date: Tue, 15 Apr 2014 23:28:04 +0000 (-0700) Subject: i965/fs: Only sweep NOPs if register coalescing made progress. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f092e8951ce5212ba3cbb382ce3a6666eb6c9bed;p=mesa.git i965/fs: Only sweep NOPs if register coalescing made progress. Otherwise there's nothing to do. --- 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 4e3b611197a..d5dd2c2954e 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; }