fixed out-flags parsing
[libfirm] / ir / be / becopyheur2.c
index 51f23b4..1653a2d 100644 (file)
@@ -30,6 +30,7 @@
 #include "irprintf.h"
 #include "irtools.h"
 
+#include "bemodule.h"
 #include "beabi.h"
 #include "benode_t.h"
 #include "becopyopt.h"
 #define DUMP_CLOUD  4
 #define DUMP_ALL    2 * DUMP_CLOUD - 1
 
-static int    dump_flags      = 0;
-static int    subtree_iter    = 4;
-static int    max_depth       = 20;
-static double constr_factor   = 0.9;
+static unsigned dump_flags      = 0;
+static int      subtree_iter    = 4;
+static int      max_depth       = 20;
+static double   constr_factor   = 0.9;
 
 /* Options using libcore */
 #ifdef WITH_LIBCORE
@@ -69,11 +70,17 @@ static const lc_opt_table_entry_t options[] = {
        { NULL }
 };
 
-void be_co2_register_options(lc_opt_entry_t *grp)
+void be_init_copyheur2(void)
 {
-       lc_opt_entry_t *co2_grp = lc_opt_get_grp(grp, "co2");
+       lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
+       lc_opt_entry_t *ra_grp = lc_opt_get_grp(be_grp, "ra");
+       lc_opt_entry_t *chordal_grp = lc_opt_get_grp(ra_grp, "chordal");
+       lc_opt_entry_t *co2_grp = lc_opt_get_grp(chordal_grp, "co2");
+
        lc_opt_add_table(co2_grp, options);
 }
+
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur2);
 #endif
 
 /*
@@ -953,7 +960,7 @@ static void process_cloud(co2_cloud_t *cloud)
 
        DBG((env->dbg, LEVEL_3, "mst:\n"));
        for(i = 0; i < cloud->n_memb; ++i) {
-               co2_cloud_irn_t *ci = cloud->seq[i];
+               DEBUG_ONLY(co2_cloud_irn_t *ci = cloud->seq[i]);
                DBG((env->dbg, LEVEL_3, "\t%+F -> %+F\n", ci->inh.irn, ci->mst_parent->inh.irn));
        }