diff options
Diffstat (limited to 'ir_hierarchical_visitor.cpp')
-rw-r--r-- | ir_hierarchical_visitor.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ir_hierarchical_visitor.cpp b/ir_hierarchical_visitor.cpp index 63ce8784ad..0d520b127f 100644 --- a/ir_hierarchical_visitor.cpp +++ b/ir_hierarchical_visitor.cpp @@ -268,3 +268,17 @@ ir_hierarchical_visitor::run(exec_list *instructions) break; } } + + +void +visit_tree(ir_instruction *ir, + void (*callback)(class ir_instruction *ir, void *data), + void *data) +{ + ir_hierarchical_visitor v; + + v.callback = callback; + v.data = data; + + ir->accept(&v); +} |