fix arm scheduler
[libfirm] / ir / be / beifg.c
index 9ca560f..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.
  *
  */
 
 /**
- * @file   beifg.c
- * @date   18.11.2005
- * @author Sebastian Hack
- *
- * Copyright (C) 2005 Universitaet Karlsruhe
- * Released under the GPL
+ * @file
+ * @brief       Interface for interference graphs.
+ * @author      Sebastian Hack
+ * @date        18.11.2005
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -79,9 +78,11 @@ 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;
+
        return (void *) arch_get_irn_register(coloring->arch_env, irn);
 }
 
@@ -260,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);
 }
@@ -721,7 +722,7 @@ static lc_opt_enum_int_var_t ifg_flavor_var = {
 
 static const lc_opt_table_entry_t be_ifg_options[] = {
        LC_OPT_ENT_ENUM_PTR ("ifg", "interference graph flavour", &ifg_flavor_var),
-       { NULL }
+       LC_OPT_LAST
 };
 
 void be_init_ifg(void)