summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beutil.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2008-10-11 22:48:47 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2008-10-11 22:48:47 +0200
commit531238c6d64bbc73956dbabd5707b20c511afc07 (patch)
tree5ba2d7328d588f815710d2458e3f12316348d79e /ir/be/beutil.c
parent6501a9e9a930ede7b9bd2a9035a0f4bb845e1e38 (diff)
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]
Diffstat (limited to 'ir/be/beutil.c')
-rw-r--r--ir/be/beutil.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/ir/be/beutil.c b/ir/be/beutil.c
index bcabe6f..1f54d65 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);
}
}