i965/cfg: Point to bblock_t containing associated control flow
authorMatt Turner <mattst88@gmail.com>
Wed, 16 Jul 2014 22:20:15 +0000 (15:20 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 22 Aug 2014 17:23:34 +0000 (10:23 -0700)
commit5e6ead5e8b0a79dce63f741dfca8328b7d4020f9
tree8798f683814b7a8d31ec3b197bb0d46f58cb044c
parent2a98ebd42b357a8cdd6267b22db090b2cef32260
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>
src/mesa/drivers/dri/i965/brw_cfg.cpp
src/mesa/drivers/dri/i965/brw_cfg.h
src/mesa/drivers/dri/i965/brw_fs_sel_peephole.cpp