summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-07-12 21:18:39 -0700
committerMatt Turner <mattst88@gmail.com>2014-08-22 10:23:34 -0700
commit20a849b4aa63c7fce96b04de674a4c70f054ed9c (patch)
tree087219521b7702de2bc0754c8831fa55140701c0 /src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
parente0aa45768c6bda947b645ae6962054673937a55f (diff)
downloadexternal_mesa3d-20a849b4aa63c7fce96b04de674a4c70f054ed9c.zip
external_mesa3d-20a849b4aa63c7fce96b04de674a4c70f054ed9c.tar.gz
external_mesa3d-20a849b4aa63c7fce96b04de674a4c70f054ed9c.tar.bz2
i965: Use basic-block aware insertion/removal functions.
To avoid invalidating and recreating the control flow graph. Also stop invalidating the CFG in places we didn't add or remove an instruction. cfg calculations: 202951 -> 80307 (-60.43%) Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
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.cpp7
1 files changed, 4 insertions, 3 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 3e3aeca..c1b785b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp
@@ -41,6 +41,7 @@
*/
#include "brw_fs.h"
+#include "brw_cfg.h"
#include "brw_fs_live_variables.h"
static bool
@@ -273,13 +274,13 @@ fs_visitor::register_coalesce()
}
if (progress) {
- foreach_in_list_safe(fs_inst, inst, &instructions) {
+ foreach_block_and_inst_safe (block, backend_instruction, inst, cfg) {
if (inst->opcode == BRW_OPCODE_NOP) {
- inst->remove();
+ inst->remove(block);
}
}
- invalidate_live_intervals();
+ invalidate_live_intervals(false);
}
return progress;