diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2013-08-06 00:47:00 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-10-10 15:54:14 -0700 |
commit | 701e9af15f9cedd8c1dbad417d195ee2a46e07bf (patch) | |
tree | 8e22b2b6fcdb4df99c8c978449e79ee02a9173e6 /src | |
parent | 8cb9cce0400362e913ad89f4ae981b8baf86bb57 (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 <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp | 11 |
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 f5daab2d2c..18ba30aad6 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 |