#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))
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 },
LC_OPT_ENT_ENUM_MASK("dump", "dump phases", &dump_var),
LC_OPT_LAST
};
-#endif /* WITH_LIBCORE */
/******************************************************************************
* _ _ __ _ _
* 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);
/**
* 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;
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);