i965/cfg: Make DO instruction begin a basic block.
authorMatt Turner <mattst88@gmail.com>
Sat, 17 May 2014 18:53:45 +0000 (11:53 -0700)
committerMatt Turner <mattst88@gmail.com>
Sun, 25 May 2014 06:03:22 +0000 (23:03 -0700)
commitdd0e1c3aff0193bc130161e6f4d13042a7d83bae
treefefbb15f4b154ca9adeb51c6814244e28dc90e40
parent04ce3be4010305902cc5ae81e8e0c8550d043a1e
i965/cfg: Make DO instruction begin a basic block.

The DO instruction doesn't exist on Gen6+. Since before this commit, DO
always ended a basic block, if it also happened to start one (e.g., a
while loop inside an if statement) the block containing only the DO
would actually contain no hardware instructions.

Pre-Gen6's WHILE instructions jumps to the instruction following the DO,
so strictly speaking we won't be modeling that properly, but I claim
there is actually no functional difference.

This will simplify an upcoming change where we want to mark the first
hardware instruction in the loop as beginning a block, and the last
instruction before the loop as ending one.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_cfg.cpp