From dc1dbd65e1099d98a05302e4ee67bc84c59a1386 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 5 May 2010 11:07:21 -0700 Subject: [PATCH] ir_visit_tree: Make sure we visit dereference targets, too. Found this with the local dead code pass, which never saw variable dereferences occurring. --- ir_visit_tree.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ir_visit_tree.cpp b/ir_visit_tree.cpp index 89def6a..b94c1b0 100644 --- a/ir_visit_tree.cpp +++ b/ir_visit_tree.cpp @@ -136,6 +136,7 @@ ir_tree_visitor::visit(ir_dereference *ir) if (ir->mode == ir_dereference::ir_reference_array) { ir->selector.array_index->accept(this); } + ir->var->accept(this); } void -- 2.7.4