summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-08-06 00:47:00 -0700
committerEric Anholt <[email protected]>2013-10-10 15:54:14 -0700
commit701e9af15f9cedd8c1dbad417d195ee2a46e07bf (patch)
tree8e22b2b6fcdb4df99c8c978449e79ee02a9173e6 /src/mesa/drivers
parent8cb9cce0400362e913ad89f4ae981b8baf86bb57 (diff)
i965/fs: Short-circuit a loop in live variable analysis.
This has no functional effect, but should make subsequent changes a little simpler. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
index f5daab2d2ce..18ba30aad6b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
@@ -64,12 +64,13 @@ fs_live_variables::setup_def_use()
/* Set use[] for this instruction */
for (unsigned int i = 0; i < 3; i++) {
- if (inst->src[i].file == GRF) {
- int reg = inst->src[i].reg;
+ if (inst->src[i].file != GRF)
+ continue;
- if (!BITSET_TEST(bd[b].def, reg))
- BITSET_SET(bd[b].use, reg);
- }
+ int reg = inst->src[i].reg;
+
+ if (!BITSET_TEST(bd[b].def, reg))
+ BITSET_SET(bd[b].use, reg);
}
/* Check for unconditional writes to whole registers. These