Mesa (master): i965/fs: Short-circuit a loop in live variable analysis.
Eric Anholt
anholt at kemper.freedesktop.org
Thu Oct 10 23:30:15 UTC 2013
Module: Mesa
Branch: master
Commit: 701e9af15f9cedd8c1dbad417d195ee2a46e07bf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=701e9af15f9cedd8c1dbad417d195ee2a46e07bf
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Aug 6 00:47:00 2013 -0700
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 at whitecape.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
.../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 f5daab2..18ba30a 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
More information about the mesa-commit
mailing list