+ return env;
+}
+
+static void be_done_env(be_main_env_t *env)
+{
+ env->arch_env->isa->impl->done(env->arch_env->isa);
+ obstack_free(&env->obst, NULL);
+}
+
+static void dump(int mask, ir_graph *irg, const char *suffix,
+ void (*dumper)(ir_graph *, const char *))
+{
+ if(dump_flags & mask)
+ dumper(irg, suffix);
+}
+
+static void prepare_graph(be_main_env_t *s, ir_graph *irg)
+{
+ /* Normalize proj nodes. */
+ normalize_proj_nodes(irg);
+
+ /* Remove critical edges */
+ remove_critical_cf_edges(irg);
+
+ /* Compute the dominance information. */
+ free_dom(irg);
+ compute_doms(irg);
+
+ /* Ensure, that the ir_edges are computed. */
+ edges_activate(irg);
+
+ /* Compute loop nesting information (for weighting copies) */
+ if (get_irg_loopinfo_state(irg) != (loopinfo_valid & loopinfo_cf_consistent))
+ construct_cf_backedges(irg);
+
+ be_check_dominance(irg);
+}
+
+static void be_main_loop(FILE *file_handle)