I was annoyed by the compiler warnings about implicit conversions.
[libfirm] / ir / be / becopyilp2.c
index b0cd699..52a36f6 100644 (file)
@@ -56,7 +56,8 @@
 #include "irgwalk.h"
 #include "becopyilp_t.h"
 #include "beifg_t.h"
-#include "besched_t.h"
+#include "besched.h"
+#include "bemodule.h"
 
 #define DEBUG_LVL 1
 
@@ -293,7 +294,7 @@ static void build_clique_star_cstr(ilp_env_t *ienv) {
                set *edges;
                int i, o, n_nodes, n_edges;
 
-               if (arch_irn_is(aff->irn, ignore))
+               if (arch_irn_is_ignore(aff->irn))
                        continue;
 
                obstack_init(&ob);
@@ -302,7 +303,7 @@ static void build_clique_star_cstr(ilp_env_t *ienv) {
                /* get all affinity neighbours */
                n_nodes = 0;
                co_gs_foreach_neighb(aff, nbr) {
-                       if (!arch_irn_is(nbr->irn, ignore)) {
+                       if (!arch_irn_is_ignore(nbr->irn)) {
                                obstack_ptr_grow(&ob, nbr->irn);
                                ++n_nodes;
                        }
@@ -406,7 +407,7 @@ static void extend_path(ilp_env_t *ienv, pdeq *path, const ir_node *irn) {
        if (pdeq_contains(path, irn))
                return;
 
-       if (arch_irn_is(irn, ignore))
+       if (arch_irn_is_ignore(irn))
                return;
 
        /* insert the new irn */
@@ -539,6 +540,17 @@ static void ilp2_apply(ilp_env_t *ienv) {
 #endif
 }
 
+void be_init_copyilp2(void)
+{
+       static co_algo_info copyheur = {
+               co_solve_ilp2, 1
+       };
+
+       be_register_copyopt("ilp", &copyheur);
+}
+
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyilp2);
+
 int co_solve_ilp2(copy_opt_t *co) {
        lpp_sol_state_t sol_state;
        ilp_env_t *ienv;