{
int lower_bound;
- ienv->lp = lpp_new(ienv->co->name, lpp_minimize);
+ ienv->lp = lpp_new("copyilp", lpp_minimize);
build_coloring_cstr(ienv);
build_interference_cstr(ienv);
build_affinity_cstr(ienv);
int i;
if (state != lpp_optimal) {
- printf("WARNING %s: Solution state is not 'optimal': %d\n",
- ienv->co->name, (int)state);
+ ir_printf("WARNING: Solution state of %F register class %s is not 'optimal': %d\n", ienv->co->irg, ienv->co->cls->name, (int)state);
if (state < lpp_feasible) {
panic("Copy coalescing solution not feasible!");
}
copy_opt_t *new_copy_opt(be_chordal_env_t *chordal_env, cost_fct_t get_costs)
{
- const char *s1, *s2, *s3;
- size_t len;
- copy_opt_t *co;
-
FIRM_DBG_REGISTER(dbg, "ir.be.copyopt");
- co = XMALLOCZ(copy_opt_t);
+ copy_opt_t *const co = XMALLOCZ(copy_opt_t);
co->cenv = chordal_env;
co->irg = chordal_env->irg;
co->cls = chordal_env->cls;
co->get_costs = get_costs;
-
- s1 = get_irp_name();
- s2 = get_entity_name(get_irg_entity(co->irg));
- s3 = chordal_env->cls->name;
- len = strlen(s1) + strlen(s2) + strlen(s3) + 5;
- co->name = XMALLOCN(char, len);
- snprintf(co->name, len, "%s__%s__%s", s1, s2, s3);
-
return co;
}
void free_copy_opt(copy_opt_t *co)
{
- xfree(co->name);
free(co);
}
be_chordal_env_t *cenv;
const arch_register_class_t *cls;
ir_graph *irg;
- char *name; /**< ProgName__IrgName__RegClassName */
cost_fct_t get_costs; /**< function ptr used to get costs for copies */
/** Representation as optimization units */