diff options
author | Matt Turner <mattst88@gmail.com> | 2014-07-12 21:18:39 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2014-08-22 10:23:34 -0700 |
commit | 20a849b4aa63c7fce96b04de674a4c70f054ed9c (patch) | |
tree | 087219521b7702de2bc0754c8831fa55140701c0 /src/mesa/drivers/dri/i965/brw_vec4_cse.cpp | |
parent | e0aa45768c6bda947b645ae6962054673937a55f (diff) | |
download | external_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_vec4_cse.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_cse.cpp | 8 |
1 files changed, 4 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 1f24af6..a0f6e77 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp @@ -165,7 +165,7 @@ vec4_visitor::opt_cse_local(bblock_t *block) entry->tmp.swizzle = BRW_SWIZZLE_XYZW; vec4_instruction *copy = MOV(entry->generator->dst, entry->tmp); - entry->generator->insert_after(copy); + entry->generator->insert_after(block, copy); entry->generator->dst = dst_reg(entry->tmp); } @@ -174,7 +174,7 @@ vec4_visitor::opt_cse_local(bblock_t *block) assert(inst->dst.type == entry->tmp.type); vec4_instruction *copy = MOV(inst->dst, entry->tmp); copy->force_writemask_all = inst->force_writemask_all; - inst->insert_before(copy); + inst->insert_before(block, copy); } /* Set our iterator so that next time through the loop inst->next @@ -183,7 +183,7 @@ vec4_visitor::opt_cse_local(bblock_t *block) */ vec4_instruction *prev = (vec4_instruction *)inst->prev; - inst->remove(); + inst->remove(block); /* Appending an instruction may have changed our bblock end. */ if (inst == block->end) { @@ -256,7 +256,7 @@ vec4_visitor::opt_cse() } if (progress) - invalidate_live_intervals(); + invalidate_live_intervals(false); return progress; } |