From: Kenneth Graunke Date: Tue, 6 Aug 2013 07:47:00 +0000 (-0700) Subject: i965/fs: Short-circuit a loop in live variable analysis. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=701e9af15f9cedd8c1dbad417d195ee2a46e07bf;p=mesa.git 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 Reviewed-by: Eric Anholt --- 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