projects
/
profile
/
ivi
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bae5be3
)
Descend down the tree in more locations in constant folding.
author
Eric Anholt
<eric@anholt.net>
Tue, 6 Apr 2010 18:42:01 +0000
(11:42 -0700)
committer
Eric Anholt
<eric@anholt.net>
Tue, 6 Apr 2010 18:42:34 +0000
(11:42 -0700)
ir_constant_folding.cpp
patch
|
blob
|
history
diff --git
a/ir_constant_folding.cpp
b/ir_constant_folding.cpp
index
006eb5f
..
eabdc24
100644
(file)
--- a/
ir_constant_folding.cpp
+++ b/
ir_constant_folding.cpp
@@
-73,6
+73,8
@@
ir_constant_folding_visitor::visit(ir_expression *ir)
op[operand] = ir->operands[operand]->constant_expression_value();
if (op[operand]) {
ir->operands[operand] = op[operand];
+ } else {
+ ir->operands[operand]->accept(this);
}
}
}
@@
-81,7
+83,7
@@
ir_constant_folding_visitor::visit(ir_expression *ir)
void
ir_constant_folding_visitor::visit(ir_swizzle *ir)
{
-
(void) ir
;
+
ir->val->accept(this)
;
}