diff options
author | Matt Turner <[email protected]> | 2014-09-01 13:35:04 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-09-24 09:42:46 -0700 |
commit | 2ff0ff880c14f246a419ae3949b2462617e485e1 (patch) | |
tree | 2a048ab67575559aafd392d06a3ced507fda049e /src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | |
parent | a4fb8897a2bd00eefa8a503ec17d45e791bced91 (diff) |
i965/fs: Don't use instruction list after calculating the cfg.
The only trick is changing a break into a return true in register
coalescing, since the macro is actually a double loop, and break will do
something different than you expect. (Wish I'd realized that earlier!)
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp index eb443d22d83..24c3d3a21d6 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp @@ -55,7 +55,7 @@ fs_visitor::assign_regs_trivial() } this->grf_used = hw_reg_mapping[this->virtual_grf_count]; - foreach_in_list(fs_inst, inst, &instructions) { + foreach_block_and_inst(block, fs_inst, inst, cfg) { assign_reg(hw_reg_mapping, &inst->dst, reg_width); for (i = 0; i < inst->sources; i++) { assign_reg(hw_reg_mapping, &inst->src[i], reg_width); @@ -242,7 +242,7 @@ fs_visitor::setup_payload_interference(struct ra_graph *g, int payload_last_use_ip[payload_node_count]; memset(payload_last_use_ip, 0, sizeof(payload_last_use_ip)); int ip = 0; - foreach_in_list(fs_inst, inst, &instructions) { + foreach_block_and_inst(block, fs_inst, inst, cfg) { switch (inst->opcode) { case BRW_OPCODE_DO: loop_depth++; @@ -362,7 +362,7 @@ fs_visitor::get_used_mrfs(bool *mrf_used) memset(mrf_used, 0, BRW_MAX_MRF * sizeof(bool)); - foreach_in_list(fs_inst, inst, &instructions) { + foreach_block_and_inst(block, fs_inst, inst, cfg) { if (inst->dst.file == MRF) { int reg = inst->dst.reg & ~BRW_MRF_COMPR4; mrf_used[reg] = true; @@ -520,7 +520,7 @@ fs_visitor::assign_regs(bool allow_spilling) reg_width); } - foreach_in_list(fs_inst, inst, &instructions) { + foreach_block_and_inst(block, fs_inst, inst, cfg) { assign_reg(hw_reg_mapping, &inst->dst, reg_width); for (int i = 0; i < inst->sources; i++) { assign_reg(hw_reg_mapping, &inst->src[i], reg_width); @@ -578,7 +578,7 @@ fs_visitor::choose_spill_reg(struct ra_graph *g) * spill/unspill we'll have to do, and guess that the insides of * loops run 10 times. */ - foreach_in_list(fs_inst, inst, &instructions) { + foreach_block_and_inst(block, fs_inst, inst, cfg) { for (unsigned int i = 0; i < inst->sources; i++) { if (inst->src[i].file == GRF) { spill_costs[inst->src[i].reg] += loop_scale; |