ir_visit_tree: Make sure we visit dereference targets, too.
authorEric Anholt <eric@anholt.net>
Wed, 5 May 2010 18:07:21 +0000 (11:07 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 5 May 2010 18:08:18 +0000 (11:08 -0700)
Found this with the local dead code pass, which never saw variable
dereferences occurring.

ir_visit_tree.cpp

index 89def6a920587beb61307cf3d2d1cb29a533d2c6..b94c1b020878f7aa33f1bdf71b9331230de42739 100644 (file)
@@ -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