* @brief Copy minimization driver.
* @author Daniel Grund
* @date 12.04.2005
- * @version $Id$
*
* Main file for the optimization reducing the copies needed for:
* - Phi coalescing
#include "irprog.h"
#include "irloop_t.h"
#include "iredges_t.h"
-#include "irbitset.h"
#include "irprintf_t.h"
#include "irtools.h"
#include "util.h"
{ NULL, 0 }
};
+/**
+ * Flags for dumping the IFG.
+ */
+enum {
+ CO_IFG_DUMP_COLORS = 1 << 0, /**< Dump the graph colored. */
+ CO_IFG_DUMP_LABELS = 1 << 1, /**< Dump node/edge labels. */
+ CO_IFG_DUMP_SHAPE = 1 << 2, /**< Give constrained nodes special shapes. */
+ CO_IFG_DUMP_CONSTR = 1 << 3, /**< Dump the node constraints in the label. */
+};
+
static const lc_opt_enum_mask_items_t style_items[] = {
{ "color", CO_IFG_DUMP_COLORS },
{ "labels", CO_IFG_DUMP_LABELS },
void co_complete_stats(const copy_opt_t *co, co_complete_stats_t *stat)
{
- bitset_t *seen = bitset_irg_malloc(co->irg);
+ bitset_t *seen = bitset_malloc(get_irg_last_idx(co->irg));
affinity_node_t *an;
memset(stat, 0, sizeof(stat[0]));
co_gs_foreach_aff_node(co, an) {
neighb_t *neigh;
stat->aff_nodes += 1;
- bitset_add_irn(seen, an->irn);
+ bitset_set(seen, get_irn_idx(an->irn));
co_gs_foreach_neighb(an, neigh) {
- if (!bitset_contains_irn(seen, neigh->irn)) {
+ if (!bitset_is_set(seen, get_irn_idx(neigh->irn))) {
stat->aff_edges += 1;
stat->max_costs += neigh->costs;
be_ifg_dump_dot(co->cenv->ifg, co->irg, f, &ifg_dot_cb, &cod);
}
-
-void co_solve_park_moon(copy_opt_t *opt)
-{
- (void) opt;
-}
-
/*
__ __ _ ____ _
| \/ | __ _(_)_ __ | _ \ _ __(_)_ _____ _ __