#include "bestat.h"
#include "beirg_t.h"
+#include <libcore/lc_opts.h>
+#include <libcore/lc_opts_enum.h>
+
DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL);
#define BE_SCHED_NODE(irn) (be_is_Keep(irn) || be_is_CopyKeep(irn) || be_is_RegParams(irn))
BE_SCHED_PREP_NONE, /* no scheduling preparation */
};
-
-#ifdef WITH_LIBCORE
-#include <libcore/lc_opts.h>
-#include <libcore/lc_opts_enum.h>
-
/* schedule selector options. */
static const lc_opt_enum_int_items_t sched_select_items[] = {
{ "trivial", BE_SCHED_SELECT_TRIVIAL },
LC_OPT_ENT_ENUM_PTR("select", "node selector", &sched_select_var),
LC_OPT_LAST
};
-#endif /* WITH_LIBCORE */
/**
* All scheduling info needed per node.
make_users_ready(env, irn);
}
-#ifdef SCHEDULE_PROJS
-/**
- * Add the proj nodes of a tuple-mode irn to the schedule immediately
- * after the tuple-moded irn. By pinning the projs after the irn, no
- * other nodes can create a new lifetime between the tuple-moded irn and
- * one of its projs. This should render a realistic image of a
- * tuple-moded irn, which in fact models a node which defines multiple
- * values.
- *
- * @param irn The tuple-moded irn.
- */
-static void add_tuple_projs(block_sched_env_t *env, ir_node *irn)
-{
- const ir_edge_t *edge;
-
- assert(get_irn_mode(irn) == mode_T && "Mode of node must be tuple");
-
- if (is_Bad(irn))
- return;
-
-
- /* non-proj nodes can have dependency edges to tuple nodes. */
- foreach_out_edge_kind(irn, edge, EDGE_KIND_DEP) {
- ir_node *out = get_edge_src_irn(edge);
- make_ready(env, irn, out);
- }
-
- /* schedule the normal projs */
- foreach_out_edge(irn, edge) {
- ir_node *out = get_edge_src_irn(edge);
-
- assert(is_Proj(out) && "successor of a modeT node must be a proj");
-
- if (get_irn_mode(out) == mode_T) {
- add_tuple_projs(env, out);
- } else {
- add_to_sched(env, out);
- }
- }
-}
-#endif
-
/**
* Perform list scheduling on a block.
*
/* Add the node to the schedule. */
add_to_sched(&be, irn);
-#ifdef SCHEDULE_PROJS
- if (get_irn_mode(irn) == mode_T)
- add_tuple_projs(&be, irn);
-#endif
-
/* remove the scheduled node from the ready list. */
ir_nodeset_remove(&be.cands, irn);
}
* Register list scheduler options.
*/
void be_init_listsched(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, "listsched");
lc_opt_add_table(sched_grp, list_sched_option_table);
-#endif
+
FIRM_DBG_REGISTER(dbg, "firm.be.sched");
}