From: Kenneth Graunke Date: Fri, 29 Apr 2016 21:04:17 +0000 (-0700) Subject: glsl: Remove bonus tree walking in opt_constant_folding(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3bf27a9a002fd5c23937e4e34aff35c94824008f;p=mesa.git glsl: Remove bonus tree walking in opt_constant_folding(). It looks like this was missed when converting opt_constant_folding() from a hierarchical visitor to an rvalue visitor in 6606fde3. ir_rvalue_visitor already processes values on the way back up the tree, so we will have already visited every child node. There's no point in doing it again. No change in shader-db. Signed-off-by: Kenneth Graunke Reviewed-by: Ian Romanick --- diff --git a/src/compiler/glsl/opt_constant_folding.cpp b/src/compiler/glsl/opt_constant_folding.cpp index 150a17b2af6..de13c9e068e 100644 --- a/src/compiler/glsl/opt_constant_folding.cpp +++ b/src/compiler/glsl/opt_constant_folding.cpp @@ -89,8 +89,6 @@ ir_constant_folding_visitor::handle_rvalue(ir_rvalue **rvalue) if (constant) { *rvalue = constant; this->progress = true; - } else { - (*rvalue)->accept(this); } }