* DEALINGS IN THE SOFTWARE.
*/
-#pragma once
#ifndef IR_HIERARCHICAL_VISITOR_H
#define IR_HIERARCHICAL_VISITOR_H
* returning \c visit_stop), or stop visiting sibling nodes (by returning \c
* visit_continue_with_parent).
*
- * These two changes combine to allow nagivation of children to be implemented
+ * These two changes combine to allow navigation of children to be implemented
* in the composite's \c accept method. The \c accept method for a leaf-node
* class will simply call the \c visit method, as usual, and pass its return
* value on. The \c accept method for internal-node classes will call the \c
virtual ir_visitor_status visit_leave(class ir_return *);
virtual ir_visitor_status visit_enter(class ir_discard *);
virtual ir_visitor_status visit_leave(class ir_discard *);
+ virtual ir_visitor_status visit_enter(class ir_demote *);
+ virtual ir_visitor_status visit_leave(class ir_demote *);
virtual ir_visitor_status visit_enter(class ir_if *);
virtual ir_visitor_status visit_leave(class ir_if *);
virtual ir_visitor_status visit_enter(class ir_emit_vertex *);
*/
void run(struct exec_list *instructions);
+ /**
+ * Utility function to call both the leave and enter callback functions.
+ * This is used for leaf nodes.
+ */
+ void call_enter_leave_callbacks(class ir_instruction *ir);
+
/* Some visitors may need to insert new variable declarations and
* assignments for portions of a subtree, which means they need a
* pointer to the current instruction in the stream, not just their