use irg from block instead of current_ir_graph in backend node constructors
[libfirm] / ir / be / becopyheur.c
index 083a06a..7fc39bb 100644 (file)
@@ -47,6 +47,9 @@
 
 DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 
+/** Defines an invalid register index. */
+#define NO_COLOR (-1)
+
 #define SEARCH_FREE_COLORS
 
 #define SLOTS_PINNED_GLOBAL 64
@@ -398,7 +401,7 @@ static inline void qnode_max_ind_set(qnode_t *qn, const unit_t *ou)
        ir_node **safe, **unsafe;
        int i, o, safe_count, safe_costs, unsafe_count, *unsafe_costs;
        bitset_t *curr, *best;
-       unsigned pos;
+       size_t pos;
        int next, curr_weight, best_weight = 0;
 
        /* assign the nodes into two groups.
@@ -461,7 +464,7 @@ static inline void qnode_max_ind_set(qnode_t *qn, const unit_t *ou)
                                                        goto no_stable_set;
 
                        /* if we arrive here, we have a stable set */
-                       /* compute the weigth of the stable set*/
+                       /* compute the weight of the stable set*/
                        curr_weight = 0;
                        bitset_foreach(curr, pos)
                                curr_weight += unsafe_costs[pos];
@@ -655,7 +658,7 @@ int co_solve_heuristic(copy_opt_t *co)
        return 0;
 }
 
-BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur);
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur)
 void be_init_copyheur(void)
 {
        static co_algo_info copyheur = {