Small bugfix
[libfirm] / ir / be / bemain.c
index d9c0e0d..41ca350 100644 (file)
@@ -30,6 +30,7 @@
 #include "bearch.h"
 #include "firm/bearch_firm.h"
 #include "ia32/bearch_ia32.h"
+#include "TEMPLATE/bearch_TEMPLATE.h"
 
 #include "be_t.h"
 #include "benumb_t.h"
@@ -104,6 +105,7 @@ static const lc_opt_enum_const_ptr_items_t ra_items[] = {
 static const lc_opt_enum_const_ptr_items_t isa_items[] = {
        { "firm",    &firm_isa },
        { "ia32",    &ia32_isa_if },
+       { "TEMPLATE",&TEMPLATE_isa_if },
        { NULL,      NULL }
 };
 
@@ -225,10 +227,6 @@ static void prepare_graph(be_irg_t *birg)
        /* 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);
-
        /* check, if the dominance property is fulfilled. */
        be_check_dominance(irg);
 
@@ -284,6 +282,9 @@ static void be_main_loop(FILE *file_handle)
                dead_node_elimination(irg);
                edges_activate(irg);
 
+               /* Compute loop nesting information (for weighting copies) */
+               construct_cf_backedges(irg);
+
                dump(DUMP_PREPARED, irg, "-prepared", dump_ir_block_graph);
 
                /* Schedule the graphs. */
@@ -303,7 +304,8 @@ static void be_main_loop(FILE *file_handle)
                ra->allocate(&birg);
                dump(DUMP_RA, irg, "-ra", dump_ir_block_graph_sched);
 
-               be_abi_fix_stack_bias(birg.abi);
+               /* This is not ready yet: */
+               /* be_abi_fix_stack_bias(birg.abi); */
 
                arch_code_generator_done(birg.cg);
                dump(DUMP_FINAL, irg, "-end", dump_ir_block_graph_sched);