becopyopt: Remove the unnecessary attribute name from struct copy_opt_t.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sat, 15 Dec 2012 13:38:29 +0000 (14:38 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sat, 15 Dec 2012 21:05:14 +0000 (22:05 +0100)
ir/be/becopyilp2.c
ir/be/becopyopt.c
ir/be/becopyopt_t.h

index f6f5862..d6e6f20 100644 (file)
@@ -531,7 +531,7 @@ static void ilp2_build(ilp_env_t *ienv)
 {
        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);
@@ -555,8 +555,7 @@ static void ilp2_apply(ilp_env_t *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!");
                        }
index f3760df..c944345 100644 (file)
@@ -182,31 +182,18 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 
 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);
 }
 
index 076e53b..7e131c7 100644 (file)
@@ -28,7 +28,6 @@ struct copy_opt_t {
        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 */