From 3bf27a9a002fd5c23937e4e34aff35c94824008f Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 29 Apr 2016 14:04:17 -0700 Subject: [PATCH] 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 --- src/compiler/glsl/opt_constant_folding.cpp | 2 -- 1 file changed, 2 deletions(-) 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); } } -- 2.30.2