[Mesa-dev] [PATCH 21/21] i965: Use short names for channel_expressions temporaries

Ian Romanick idr at freedesktop.org
Tue May 27 19:49:16 PDT 2014


From: Ian Romanick <ian.d.romanick at intel.com>

Reduces the peak ir_variable memory usage in a trimmed apitrace of dota2
by 39KiB on 64-bit.

Before: IR MEM: variable usage / name / total: 5327760 935234 6262994
After:  IR MEM: variable usage / name / total: 5327760 894914 6222674

Reduces the peak ir_variable memory usage in a trimmed apitrace of dota2
by 26KiB on 32-bit.

Before: IR MEM: variable usage / name / total: 4118280 670980 4789260
After:  IR MEM: variable usage / name / total: 4118280 644100 4762380

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
index ae5bc56..7d4e25b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
@@ -163,8 +163,7 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
       assert(!expr->operands[i]->type->is_matrix());
 
       op_var[i] = new(mem_ctx) ir_variable(expr->operands[i]->type,
-					   "channel_expressions",
-					   ir_var_temporary);
+                                           "$c", ir_var_temporary);
       ir->insert_before(op_var[i]);
 
       deref = new(mem_ctx) ir_dereference_variable(op_var[i]);
-- 
1.8.1.4



More information about the mesa-dev mailing list