+/*
+ * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
/**
- * More experiments on coalescing.
- * @author Sebastian Hack
- * @date 14.04.2006
+ * @file
+ * @brief More experiments on coalescing.
+ * @author Sebastian Hack
+ * @date 14.04.2006
+ * @version $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "becopyopt.h"
#include "becopyopt_t.h"
#include "bechordal_t.h"
+#include "beirg_t.h"
#define DUMP_BEFORE 1
#define DUMP_AFTER 2
LC_OPT_ENT_INT ("iter", "iterations for subtree nodes", &subtree_iter),
LC_OPT_ENT_DBL ("cf", "factor of constraint importance (between 0.0 and 1.0)", &constr_factor),
LC_OPT_ENT_INT ("max", "maximum recursion depth", &max_depth),
- { NULL }
+ LC_OPT_LAST
};
void be_init_copyheur2(void)
co2_t *env = ci->cloud->env;
col_cost_pair_t *seq = alloca(env->n_regs * sizeof(seq[0]));
int is_root = ci->mst_parent == ci;
- col_t parent_col = is_root ? -1 : get_col(env, ci->mst_parent->inh.irn);
+ col_t parent_col = is_root ? (col_t) -1 : get_col(env, ci->mst_parent->inh.irn);
int min_badness = INT_MAX;
int best_col_costs = INT_MAX;
int best_col = -1;
|_| |___/
*/
-static const char *get_dot_color_name(int col)
+static const char *get_dot_color_name(size_t col)
{
static const char *names[] = {
"blue",
"palevioletred"
};
- return col < sizeof(names)/sizeof(names[0]) ? names[col] : "white";
+ return col < (sizeof(names)/sizeof(names[0])) ? names[col] : "white";
}
static const char *get_dot_shape_name(co2_t *env, co2_irn_t *ci)
static void ifg_dump_graph_attr(FILE *f, void *self)
{
+ (void) self;
fprintf(f, "overlay=false");
}
int co_solve_heuristic_new(copy_opt_t *co)
{
- char buf[256];
+ char buf[256];
co2_t env;
- FILE *f;
+ FILE *f;
phase_init(&env.ph, "co2", co->cenv->birg->irg, PHASE_DEFAULT_GROWTH, co2_irn_init, NULL);
env.touched = NULL;