From: Jason Ekstrand Date: Tue, 9 Sep 2014 01:34:28 +0000 (-0700) Subject: i965/fs: Use the var_from_vgrf helper function instead of doing it manually X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab7234c8520499fcfeed153e0aefeb6b43758d1f;p=mesa.git i965/fs: Use the var_from_vgrf helper function instead of doing it manually Signed-off-by: Jason Ekstrand Reviewed-by: Matt Turner --- 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 0d26103cc66..7838775dd17 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 @@ -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); } } }