diff options
author | Matt Turner <[email protected]> | 2014-07-12 11:21:21 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-07-21 10:35:41 -0700 |
commit | 3e9105f7eefae97c928034662f67019973b9e483 (patch) | |
tree | d4b0bbc29d1a895e3932ddc79643e9032976c965 /src/mesa | |
parent | 1761671b0627ce8e1c0eae721e1fca5c2d04690e (diff) |
i965/vec4: Use foreach_inst_in_block a couple more places.
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_cse.cpp | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 49a4e9b6274..045e1c5d413 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -755,14 +755,11 @@ vec4_visitor::opt_set_dependency_control() for (int i = 0; i < cfg->num_blocks; i++) { bblock_t *bblock = cfg->blocks[i]; - vec4_instruction *inst; memset(last_grf_write, 0, sizeof(last_grf_write)); memset(last_mrf_write, 0, sizeof(last_mrf_write)); - for (inst = (vec4_instruction *)bblock->start; - inst != (vec4_instruction *)bblock->end->next; - inst = (vec4_instruction *)inst->next) { + foreach_inst_in_block (vec4_instruction, inst, bblock) { /* If we read from a register that we were doing dependency control * on, don't do dependency control across the read. */ diff --git a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp index 86360d25d2a..29d2e026205 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp @@ -132,10 +132,7 @@ vec4_visitor::opt_cse_local(bblock_t *block) void *cse_ctx = ralloc_context(NULL); int ip = block->start_ip; - for (vec4_instruction *inst = (vec4_instruction *)block->start; - inst != block->end->next; - inst = (vec4_instruction *) inst->next) { - + foreach_inst_in_block (vec4_instruction, inst, block) { /* Skip some cases. */ if (is_expression(inst) && !inst->predicate && inst->mlen == 0 && (inst->dst.file != HW_REG || inst->dst.is_null())) |