summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-07-11 21:24:02 -0700
committerMatt Turner <mattst88@gmail.com>2014-07-21 10:35:39 -0700
commit1761671b0627ce8e1c0eae721e1fca5c2d04690e (patch)
tree8307a0771b9ce98f737680e1e96b3e56346abf45 /src/mesa/drivers/dri/i965/brw_vec4_cse.cpp
parentdd65a6d9ada7cfa1b694d4211d8c95e446b29c62 (diff)
downloadexternal_mesa3d-1761671b0627ce8e1c0eae721e1fca5c2d04690e.zip
external_mesa3d-1761671b0627ce8e1c0eae721e1fca5c2d04690e.tar.gz
external_mesa3d-1761671b0627ce8e1c0eae721e1fca5c2d04690e.tar.bz2
i965: Replace cfg instances with calls to calculate_cfg().
Avoids regenerating it unnecessarily. Every program in shader-db improved, none by an amount less than a 1/3 reduction. One Dota2 shader decreased from 62 -> 24. cfg calculations: 429492 -> 193197 (-55.02%) Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_cse.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_cse.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp
index 83c7eb8..86360d2 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp
@@ -254,10 +254,8 @@ vec4_visitor::opt_cse()
calculate_live_intervals();
- cfg_t cfg(&instructions);
-
- for (int b = 0; b < cfg.num_blocks; b++) {
- bblock_t *block = cfg.blocks[b];
+ for (int b = 0; b < cfg->num_blocks; b++) {
+ bblock_t *block = cfg->blocks[b];
progress = opt_cse_local(block) || progress;
}