- copy libcore into libfirm
[libfirm] / ir / common / firm.c
index 79a6ca0..10646d0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -40,9 +40,7 @@
 # include <stdio.h>
 #endif
 
-#ifdef WITH_LIBCORE
-# include <libcore/lc_opts.h>
-#endif
+#include "lc_opts.h"
 
 #include "ident_t.h"
 #include "firm.h"
 #include "firmstat.h"
 #include "irarch.h"
 #include "reassoc_t.h"
+#include "funccall_t.h"
 #include "irhooks.h"
 #include "iredges_t.h"
 #include "debugger.h"
 
-#ifdef WITH_LIBCORE
 /* returns the firm root */
 lc_opt_entry_t *firm_opt_get_root(void) {
        static lc_opt_entry_t *grp = NULL;
@@ -72,17 +70,10 @@ lc_opt_entry_t *firm_opt_get_root(void) {
                grp = lc_opt_get_grp(lc_opt_root_grp(), "firm");
        return grp;
 }
-#endif
 
 void firm_init_options(const char *arg_prefix, int argc, const char **argv) {
-#ifdef LIBCORE
        /* parse any init files for firm */
        lc_opts_init("firm", firm_opt_get_root(), arg_prefix, argc, argv);
-#else
-       (void) arg_prefix;
-       (void) argc;
-       (void) argv;
-#endif
 }
 
 void init_firm(const firm_parameter_t *param)
@@ -133,6 +124,8 @@ void init_firm(const firm_parameter_t *param)
        init_cons(def_params.initialize_local_func);
        /* initialize reassociation */
        firm_init_reassociation();
+       /* initialize function call optimization */
+       firm_init_funccalls();
        /* Builds a construct allowing to access all information to be constructed
           later. */
        init_irprog_2();