projects
/
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 006eb5ffcfcec733c25f64f28ec6c06cef2f2d37..eabdc240ad34a3b4dbae7c75a67e3b1e55f7d53b 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)
;
}