Fixed initialization of option tables
[libfirm] / ir / be / bemain.c
index fb84b22..a1453a8 100644 (file)
@@ -49,9 +49,7 @@
 #include "irtools.h"
 #include "irvrfy.h"
 #include "irprintf.h"
-#include "return.h"
 #include "firmstat.h"
-#include "cfopt.h"
 #include "execfreq.h"
 
 #include "bearch_t.h"
@@ -162,7 +160,7 @@ static const lc_opt_table_entry_t be_main_options[] = {
        LC_OPT_ENT_STR ("ilp.server", "the ilp server name", be_options.ilp_server, sizeof(be_options.ilp_server)),
        LC_OPT_ENT_STR ("ilp.solver", "the ilp solver name", be_options.ilp_solver, sizeof(be_options.ilp_solver)),
 #endif /* WITH_ILP */
-       { NULL }
+       LC_OPT_LAST
 };
 
 static be_module_list_entry_t *isa_ifs = NULL;
@@ -205,11 +203,15 @@ int be_parse_arg(const char *arg) {
 }
 
 /** The be parameters returned by default, all off. */
-const static backend_params be_params = {
-       NULL,
-       NULL,
-       0,
-       NULL,
+static const backend_params be_params = {
+       0,    /* need dword lowering */
+       0,    /* don't support inlien assembler yet */
+       0,    /* no different calling conventions */
+       NULL, /* no additional opcodes */
+       NULL, /* will be set later */
+       NULL, /* but yet no creator function */
+       NULL, /* context for create_intrinsic_fkt */
+       NULL, /* no if conversion settings */
 };
 
 /* Perform schedule verification if requested. */
@@ -312,8 +314,8 @@ static void initialize_birg(be_irg_t *birg, ir_graph *irg, be_main_env_t *env)
        /* Normalize proj nodes. */
        normalize_proj_nodes(irg);
 
-       /* create multiple return nodes */
-       /* TODO: find out why this does nothing */
+       /* we do this before critical edge split. As this produces less returns,
+          because sometimes (= 164.gzip) multiple returns are slower */
        normalize_n_returns(irg);
 
        /* Remove critical edges */
@@ -326,6 +328,8 @@ static void initialize_birg(be_irg_t *birg, ir_graph *irg, be_main_env_t *env)
        be_phi_handler_reset(env->phi_handler);
 
        set_irg_phase_state(irg, phase_backend);
+
+       dump(DUMP_INITIAL, irg, "-prepared", dump_ir_block_graph);
 }
 
 #define BE_TIMER_PUSH(timer)                                                        \
@@ -538,7 +542,9 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
                else
                        birg->exec_freq = compute_execfreq(irg, 10);
 
-               be_live_chk_compare(birg);
+
+               /* disabled for now, fails for EmptyFor.c and XXEndless.c */
+               /* be_live_chk_compare(birg); */
 
                /* let backend prepare scheduling */
                BE_TIMER_PUSH(t_codegen);