+ draw_interval_graph(env, bl, &dump_params);
+
+ intv_filename(buf, sizeof(buf), env, bl);
+ ir_fprintf(f, "\tb%N [shape=\"epsf\" shapefile=\"%s\"];\n", bl, buf);
+}
+
+static void dump_edges(ir_node *bl, void *data)
+{
+ const env_t *env = data;
+ FILE *f = env->data;
+ int i, n;
+ ir_node *dom;
+
+#if 0
+ for(i = 0, n = get_irn_arity(bl); i < n; ++i) {
+ ir_node *pred = get_irn_n(bl, i);
+ ir_fprintf(f, "\tb%N -> b%N;\n", get_nodes_block(pred), bl);
+ }
+#endif
+
+ for(dom = get_Block_dominated_first(bl); dom;
+ dom = get_Block_dominated_next(dom)) {
+
+ ir_fprintf(f, "\tb%N -> b%N;\n", dom, bl);
+ }
+}
+
+static void dump_intv_cfg(env_t *env)
+{
+ FILE *f;
+ char buf[128];
+
+ ir_snprintf(buf, sizeof(buf), "intv_cfg_%s_%F.dot",
+ env->cls->name, env->irg);
+
+ if((f = fopen(buf, "wt")) != NULL) {
+ void *old_data = env->data;
+
+ env->data = f;
+ ir_fprintf(f, "digraph G {\n");
+ ir_fprintf(f, "\tgraph [rankdir=\"LR\", ordering=\"out\"];\n");
+ dom_tree_walk_irg(env->irg, dump_block, dump_edges, env);
+ // irg_block_walk_graph(env->irg, dump_block, dump_edges, env);
+ ir_fprintf(f, "}\n");
+ fclose(f);
+
+ env->data = old_data;
+ }
+}
+
+#endif
+
+#ifdef BUILD_GRAPH