From 531238c6d64bbc73956dbabd5707b20c511afc07 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sat, 11 Oct 2008 20:48:47 +0000 Subject: [PATCH] Remove the unused attribute const arch_env_t *arch_env from struct dump_env and also the then unused parameter const arch_env_t *arch_env from dump_allocated_irg(). [r22753] --- ir/be/beutil.c | 30 ++++++++++++------------------ ir/be/beutil.h | 2 +- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/ir/be/beutil.c b/ir/be/beutil.c index bcabe6fbb..1f54d65f0 100644 --- a/ir/be/beutil.c +++ b/ir/be/beutil.c @@ -58,17 +58,12 @@ pset *be_empty_set(void) return empty_set; } -struct dump_env { - FILE *f; - arch_env_t *env; -}; - static void dump_allocated_block(ir_node *block, void *data) { - int i, n; + FILE *f = data; const ir_node *irn; - struct dump_env *dump_env = data; - FILE *f = dump_env->f; + int n; + int i; ir_fprintf(f, "node:{title:\"b%N\"\nlabel:\"", block); sched_foreach(block, irn) { @@ -105,20 +100,19 @@ static void dump_allocated_block(ir_node *block, void *data) } } -void dump_allocated_irg(arch_env_t *arch_env, ir_graph *irg, char *suffix) +void dump_allocated_irg(ir_graph *irg, char *suffix) { - char buf[1024]; - struct dump_env env; - - env.env = arch_env; + char buf[1024]; + FILE *f; ir_snprintf(buf, sizeof(buf), "%F-alloc%s.vcg", irg, suffix); - if((env.f = fopen(buf, "wt")) != NULL) { - fprintf(env.f, "graph:{title:\"prg\"\n"); - irg_block_walk_graph(irg, dump_allocated_block, NULL, &env); - fprintf(env.f, "}\n"); - fclose(env.f); + f = fopen(buf, "wt"); + if (f != NULL) { + fprintf(f, "graph:{title:\"prg\"\n"); + irg_block_walk_graph(irg, dump_allocated_block, NULL, f); + fprintf(f, "}\n"); + fclose(f); } } diff --git a/ir/be/beutil.h b/ir/be/beutil.h index fb74fc2c0..008e108e4 100644 --- a/ir/be/beutil.h +++ b/ir/be/beutil.h @@ -116,7 +116,7 @@ static INLINE int is_data_node(const ir_node *irn) * @param irg The irg. Note that scheduling, register allocation must * have been performed. */ -void dump_allocated_irg(arch_env_t *env, ir_graph *irg, char *suffix); +void dump_allocated_irg(ir_graph *irg, char *suffix); void be_clear_links(ir_graph *irg); -- 2.20.1