summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-07-16 15:20:15 -0700
committerMatt Turner <mattst88@gmail.com>2014-08-22 10:23:34 -0700
commit5e6ead5e8b0a79dce63f741dfca8328b7d4020f9 (patch)
tree8798f683814b7a8d31ec3b197bb0d46f58cb044c /src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp
parent2a98ebd42b357a8cdd6267b22db090b2cef32260 (diff)
downloadexternal_mesa3d-5e6ead5e8b0a79dce63f741dfca8328b7d4020f9.zip
external_mesa3d-5e6ead5e8b0a79dce63f741dfca8328b7d4020f9.tar.gz
external_mesa3d-5e6ead5e8b0a79dce63f741dfca8328b7d4020f9.tar.bz2
i965/cfg: Point to bblock_t containing associated control flow
... rather than pointing directly to the associated instruction. This will let us set the block containing the IF statement's else-pointer to NULL, when we delete a useless ELSE instruction, as in the case (+f0) if(8) ... else(8) endif(8) Also, remove the pointer to the ENDIF, since it's unused, and it was also potentially wrong, in the case of a basic block containing both an ENDIF and an IF instruction: endif(8) cmp.ne.f0(8) ... (+f0) if(8) Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp b/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp
index 5c79296..d64cd98 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp
@@ -137,10 +137,10 @@ fs_visitor::opt_peephole_sel()
if (if_inst->opcode != BRW_OPCODE_IF)
continue;
- if (!block->else_inst)
+ if (!block->else_block)
continue;
- fs_inst *else_inst = (fs_inst *) block->else_inst;
+ fs_inst *else_inst = (fs_inst *) block->else_block->end;
assert(else_inst->opcode == BRW_OPCODE_ELSE);
fs_inst *else_mov[MAX_MOVS] = { NULL };