added rss scheduling preparation
BE_SCHED_SELECT_RANDOM = 5
};
BE_SCHED_SELECT_RANDOM = 5
};
+enum {
+ BE_SCHED_PREP_NONE = 0,
+ BE_SCHED_PREP_MRIS = 2,
+ BE_SCHED_PREP_RSS = 3
+};
+
/** Backend options */
struct _be_options_t {
int dump_flags; /**< backend dumping flags */
int timing; /**< time the backend phases */
int sched_select; /**< the current scheduler */
/** Backend options */
struct _be_options_t {
int dump_flags; /**< backend dumping flags */
int timing; /**< time the backend phases */
int sched_select; /**< the current scheduler */
int opt_profile; /**< instrument code for profiling */
int mris; /**< enable mris preparation */
int omit_fp; /**< try to omit the frame pointer */
int opt_profile; /**< instrument code for profiling */
int mris; /**< enable mris preparation */
int omit_fp; /**< try to omit the frame pointer */
/* List schedule a graph. */
void list_sched(const be_irg_t *birg, be_options_t *be_opts)
{
/* List schedule a graph. */
void list_sched(const be_irg_t *birg, be_options_t *be_opts)
{
- const arch_env_t *arch_env = birg->main_env->arch_env;
- ir_graph *irg = birg->irg;
+ const arch_env_t *arch_env = birg->main_env->arch_env;
+ ir_graph *irg = birg->irg;
int num_nodes;
sched_env_t env;
int num_nodes;
sched_env_t env;
/* Assure, that the out edges are computed */
edges_assure(irg);
/* Assure, that the out edges are computed */
edges_assure(irg);
- if (be_opts->mris)
- mris = be_sched_mris_preprocess(birg);
+ switch (be_opts->sched_prep) {
+ case BE_SCHED_PREP_MRIS:
+ mris = be_sched_mris_preprocess(birg);
+ break;
+ case BE_SCHED_PREP_RSS:
+ rss_schedule_preparation(birg);
+ break;
+ default:
+ break;
+ }
num_nodes = get_irg_last_idx(irg);
num_nodes = get_irg_last_idx(irg);
if (env.selector->finish_graph)
env.selector->finish_graph(env.selector_env);
if (env.selector->finish_graph)
env.selector->finish_graph(env.selector_env);
+ if (be_opts->sched_prep == BE_SCHED_PREP_MRIS)
be_sched_mris_free(mris);
DEL_ARR_F(env.sched_info);
be_sched_mris_free(mris);
DEL_ARR_F(env.sched_info);
DUMP_NONE, /* dump flags */
BE_TIME_OFF, /* no timing */
BE_SCHED_SELECT_HEUR, /* mueller heuristic selector */
DUMP_NONE, /* dump flags */
BE_TIME_OFF, /* no timing */
BE_SCHED_SELECT_HEUR, /* mueller heuristic selector */
+ BE_SCHED_PREP_NONE, /* no scheduling preparation */
0, /* no opt profile */
0, /* disable mris */
1, /* try to omit frame pointer */
0, /* no opt profile */
0, /* disable mris */
1, /* try to omit frame pointer */
+/* schedule preparation options. */
+static const lc_opt_enum_int_items_t sched_prep_items[] = {
+ { "none", BE_SCHED_PREP_NONE },
+ { "mris", BE_SCHED_PREP_MRIS },
+ { "rss", BE_SCHED_PREP_RSS },
+ { NULL, 0 }
+};
+
static lc_opt_enum_mask_var_t dump_var = {
&be_options.dump_flags, dump_items
};
static lc_opt_enum_mask_var_t dump_var = {
&be_options.dump_flags, dump_items
};
&be_options.sched_select, sched_select_items
};
&be_options.sched_select, sched_select_items
};
+static lc_opt_enum_int_var_t sched_prep_var = {
+ &be_options.sched_prep, sched_prep_items
+};
+
static const lc_opt_table_entry_t be_main_options[] = {
LC_OPT_ENT_STR ("config", "read another config file containing backend options", config_file, sizeof(config_file)),
LC_OPT_ENT_ENUM_MASK("dump", "dump irg on several occasions", &dump_var),
static const lc_opt_table_entry_t be_main_options[] = {
LC_OPT_ENT_STR ("config", "read another config file containing backend options", config_file, sizeof(config_file)),
LC_OPT_ENT_ENUM_MASK("dump", "dump irg on several occasions", &dump_var),
LC_OPT_ENT_ENUM_PTR ("vrfy", "verify the backend irg (off, warn, assert)", &vrfy_var),
LC_OPT_ENT_BOOL ("time", "get backend timing statistics", &be_options.timing),
LC_OPT_ENT_BOOL ("profile", "instrument the code for execution count profiling", &be_options.opt_profile),
LC_OPT_ENT_ENUM_PTR ("vrfy", "verify the backend irg (off, warn, assert)", &vrfy_var),
LC_OPT_ENT_BOOL ("time", "get backend timing statistics", &be_options.timing),
LC_OPT_ENT_BOOL ("profile", "instrument the code for execution count profiling", &be_options.opt_profile),
- LC_OPT_ENT_BOOL ("sched.mris", "enable mris schedule preparation", &be_options.mris),
+ LC_OPT_ENT_ENUM_PTR ("sched.prep", "schedule preparation (none, mris, rss)", &sched_prep_var),
LC_OPT_ENT_ENUM_PTR ("sched.select", "schedule node selector (trivial, regpress, muchnik, heur, hmuchnik)", &sched_select_var),
#ifdef WITH_ILP
LC_OPT_ENT_ENUM_PTR ("sched.select", "schedule node selector (trivial, regpress, muchnik, heur, hmuchnik)", &sched_select_var),
#ifdef WITH_ILP