[Mesa-dev] [PATCH 07/12] i965/fs: Use the var_from_vgrf helper function instead of doing it manually
Jason Ekstrand
jason at jlekstrand.net
Fri Sep 19 13:10:25 PDT 2014
Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.com>
---
src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
index 697b44a..036875f 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp
@@ -58,7 +58,7 @@ fs_visitor::dead_code_eliminate()
int var = live_intervals->var_from_reg(&inst->dst);
result_live = BITSET_TEST(live, var);
} else {
- int var = live_intervals->var_from_vgrf[inst->dst.reg];
+ int var = live_intervals->var_from_reg(&inst->dst);
for (int i = 0; i < inst->regs_written; i++) {
result_live = result_live || BITSET_TEST(live, var + i);
}
@@ -78,19 +78,19 @@ fs_visitor::dead_code_eliminate()
if (inst->dst.file == GRF) {
if (!inst->is_partial_write()) {
- int var = live_intervals->var_from_vgrf[inst->dst.reg];
+ int var = live_intervals->var_from_reg(&inst->dst);
for (int i = 0; i < inst->regs_written; i++) {
- BITSET_CLEAR(live, var + inst->dst.reg_offset + i);
+ BITSET_CLEAR(live, var + i);
}
}
}
for (int i = 0; i < inst->sources; i++) {
if (inst->src[i].file == GRF) {
- int var = live_intervals->var_from_vgrf[inst->src[i].reg];
+ int var = live_intervals->var_from_reg(&inst->src[i]);
for (int j = 0; j < inst->regs_read(this, i); j++) {
- BITSET_SET(live, var + inst->src[i].reg_offset + j);
+ BITSET_SET(live, var + j);
}
}
}
--
2.1.0
More information about the mesa-dev
mailing list