-static void traverse_dom_blocks(blk_collect_data_t* blks, irg_walk_func *pre, irg_walk_func *post, void *env) {
+static void dom_block_visit_both(ir_node *block, void *env) {
+ dom_traversal_t *ctx = env;
+ block_entry_t *entry = block_find_entry(block, ctx->blks);
+
+ traverse_block_pre(block, entry, ctx->pre, ctx->env);
+ traverse_block_post(block, entry, ctx->post, ctx->env);
+}
+
+/**
+ * Do the traversal in the dominator tree in top-down order.
+ */
+static void traverse_dom_blocks_top_down(blk_collect_data_t* blks, irg_walk_func *pre, irg_walk_func *post, void *env) {