fix arm scheduler
[libfirm] / ir / be / beifg.c
index 50e0899..2b3715e 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.
  *
 
 #include <stdlib.h>
 
+#include <libcore/lc_opts.h>
+#include <libcore/lc_opts_enum.h>
+#include <libcore/lc_timing.h>
+
 #include "bitset.h"
 #include "irgwalk.h"
 #include "irnode_t.h"
@@ -74,7 +78,7 @@ size_t (be_ifg_cliques_iter_size)(const be_ifg_t *ifg)
        return ifg->impl->cliques_iter_size;
 }
 
-static void *regs_irn_data_init(ir_phase *ph, ir_node *irn, void *data)
+static void *regs_irn_data_init(ir_phase *ph, const ir_node *irn, void *data)
 {
        coloring_t *coloring = (coloring_t *) ph;
        (void) data;
@@ -257,8 +261,8 @@ static int be_ifg_check_cmp_nodes(const void *a, const void *b)
        const ir_node *node_a = *(ir_node **)a;
        const ir_node *node_b = *(ir_node **)b;
 
-       long nr_a = get_irn_node_nr(node_a);
-       long nr_b = get_irn_node_nr(node_b);
+       long nr_a = get_irn_idx(node_a);
+       long nr_b = get_irn_idx(node_b);
 
        return QSORT_CMP(nr_a, nr_b);
 }
@@ -702,11 +706,6 @@ enum {
 
 static int ifg_flavor = BE_IFG_STD;
 
-#ifdef WITH_LIBCORE
-#include <libcore/lc_opts.h>
-#include <libcore/lc_opts_enum.h>
-#include <libcore/lc_timing.h>
-
 static const lc_opt_enum_int_items_t ifg_flavor_items[] = {
        { "std",     BE_IFG_STD     },
        { "fast",    BE_IFG_FAST    },
@@ -725,16 +724,13 @@ static const lc_opt_table_entry_t be_ifg_options[] = {
        LC_OPT_ENT_ENUM_PTR ("ifg", "interference graph flavour", &ifg_flavor_var),
        LC_OPT_LAST
 };
-#endif /* WITH_LIBCORE */
 
 void be_init_ifg(void)
 {
-#ifdef WITH_LIBCORE
        lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
        lc_opt_entry_t *ifg_grp = lc_opt_get_grp(be_grp, "ifg");
 
        lc_opt_add_table(ifg_grp, be_ifg_options);
-#endif
 }
 
 BE_REGISTER_MODULE_CONSTRUCTOR(be_init_ifg);