Tell heur1 about the second should_be_same.
[libfirm] / ir / be / beschedrss.c
index 6f518df..a7ecc1d 100644 (file)
 #include "besched_t.h"
 #include "beirg_t.h"
 
+#include <libcore/lc_opts.h>
+#include <libcore/lc_opts_enum.h>
+
+
 #define ARR_LEN_SAFE(arr) ((arr) != NULL ? ARR_LEN((arr)) : 0)
 
 #define HASH_RSS_EDGE(edge) ((get_irn_node_nr((edge)->src) << 16) | (get_irn_node_nr((edge)->tgt) & 0xFFFF))
@@ -197,10 +201,6 @@ static rss_opts_t rss_options = {
        RSS_DUMP_NONE,
 };
 
-#ifdef WITH_LIBCORE
-#include <libcore/lc_opts.h>
-#include <libcore/lc_opts_enum.h>
-
 static const lc_opt_enum_int_items_t dump_items[] = {
        { "none",  RSS_DUMP_NONE  },
        { "cbc",   RSS_DUMP_CBC   },
@@ -220,7 +220,6 @@ static const lc_opt_table_entry_t rss_option_table[] = {
        LC_OPT_ENT_ENUM_MASK("dump", "dump phases", &dump_var),
        LC_OPT_LAST
 };
-#endif /* WITH_LIBCORE */
 
 /******************************************************************************
  *  _          _                    __                  _   _
@@ -2137,13 +2136,11 @@ static void process_block(ir_node *block, void *env) {
  * Register the options.
  */
 void be_init_schedrss(void) {
-#ifdef WITH_LIBCORE
        lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
        lc_opt_entry_t *sched_grp = lc_opt_get_grp(be_grp, "sched");
        lc_opt_entry_t *rss_grp = lc_opt_get_grp(sched_grp, "rss");
 
        lc_opt_add_table(rss_grp, rss_option_table);
-#endif
 }
 
 BE_REGISTER_MODULE_CONSTRUCTOR(be_init_schedrss);
@@ -2151,7 +2148,7 @@ BE_REGISTER_MODULE_CONSTRUCTOR(be_init_schedrss);
 /**
  * Preprocess the irg for scheduling.
  */
-void rss_schedule_preparation(const be_irg_t *birg) {
+void rss_schedule_preparation(be_irg_t *birg) {
        ir_graph *irg = be_get_birg_irg(birg);
        rss_t rss;
 
@@ -2167,7 +2164,8 @@ void rss_schedule_preparation(const be_irg_t *birg) {
        rss.h        = heights_new(irg);
        rss.nodes    = plist_new();
        rss.opts     = &rss_options;
-       rss.liveness = be_liveness(irg);
+       rss.liveness = be_liveness(birg);
+       be_liveness_assure_sets(rss.liveness);
        irg_block_walk_graph(irg, NULL, process_block, &rss);
        heights_free(rss.h);
        plist_free(rss.nodes);