+ /* set the current graph (this is important for several firm functions) */
+ current_ir_graph = irg;
+
+ /* get a code generator for this graph. */
+ cg = arch_isa_make_code_generator(isa, irg);
+
+ /* create the code generator and generate code. */
+ prepare_graph(&env, irg);
+ arch_code_generator_prepare_graph(cg);
+
+ edges_deactivate(irg);
+ dead_node_elimination(irg);
+ edges_activate(irg);
+
+ dump(DUMP_PREPARED, irg, "-prepared", dump_ir_block_graph);
+
+ /* Schedule the graphs. */
+ arch_code_generator_before_sched(cg);
+ list_sched(isa, irg);
+
+ dump(DUMP_SCHED, irg, "-sched", dump_ir_block_graph_sched);
+
+ /* Verify the schedule */
+ sched_verify_irg(irg);
+
+ /* Do register allocation */
+ arch_code_generator_before_ra(cg);
+ ra->allocate(&env, irg);
+
+ dump(DUMP_RA, irg, "-ra", dump_ir_block_graph_sched);
+
+ arch_code_generator_done(cg);
+ dump(DUMP_FINAL, irg, "-end", dump_ir_block_graph_sched);