+/**
+ * Iterate over all nodes which are immediately dominated by a given
+ * node.
+ * @param bl The block whose dominated blocks shall be iterated on.
+ * @param curr An iterator variable of type ir_node*
+ */
+#define dominates_for_each(bl,curr) \
+ for(curr = get_Block_dominated_first(bl); curr; \
+ curr = get_Block_dominated_next(curr))
+
+/**
+ * Iterate over all nodes which are immediately post dominated by a given
+ * node.
+ * @param bl The block whose post dominated blocks shall be iterated on.
+ * @param curr An iterator variable of type ir_node*
+ */
+#define postdominates_for_each(bl,curr) \
+ for(curr = get_Block_postdominated_first(bl); curr; \
+ curr = get_Block_postdominated_next(curr))
+
+/**
+ * Check, if a block dominates another block.
+ * @param a The first block.
+ * @param b The second block.
+ * @return 1, if @p a dominates @p b, else 0.
+ */
+int block_dominates(const ir_node *a, const ir_node *b);
+
+/**
+ * Check, if a block post dominates another block.
+ * @param a The first block.
+ * @param b The second block.
+ * @return 1, if @p a post dominates @p b, else 0.
+ */
+int block_postdominates(const ir_node *a, const ir_node *b);
+
+/**
+ * Visit all nodes in the dominator subtree of a given node.
+ * Call a pre-visitor before descending to the children and call a
+ * post-visitor after returning from them.
+ * @param n The node to start walking from.
+ * @param pre The pre-visitor callback.
+ * @param post The post-visitor callback.
+ * @param env Some custom data passed to the visitors.
+ */
+void dom_tree_walk(ir_node *n, irg_walk_func *pre,
+ irg_walk_func *post, void *env);
+
+/**
+ * Visit all nodes in the post dominator subtree of a given node.
+ * Call a pre-visitor before descending to the children and call a
+ * post-visitor after returning from them.
+ * @param n The node to start walking from.
+ * @param pre The pre-visitor callback.
+ * @param post The post-visitor callback.
+ * @param env Some custom data passed to the visitors.
+ */
+void postdom_tree_walk(ir_node *n, irg_walk_func *pre,
+ irg_walk_func *post, void *env);
+
+/**
+ * Walk over the dominator tree of an irg starting at the root.
+ * @param irg The graph.
+ * @param pre A pre-visitor to call.
+ * @param post A post-visitor to call.
+ * @param env Some private data to give to the visitors.
+ */
+void dom_tree_walk_irg(ir_graph *irg, irg_walk_func *pre,
+ irg_walk_func *post, void *env);
+
+/**
+ * Walk over the post dominator tree of an irg starting at the root.
+ * @param irg The graph.
+ * @param pre A pre-visitor to call.
+ * @param post A post-visitor to call.
+ * @param env Some private data to give to the visitors.
+ */
+void postdom_tree_walk_irg(ir_graph *irg, irg_walk_func *pre,
+ irg_walk_func *post, void *env);
+
+/* ------------ Building and Removing the dominator data structure ----------- */