X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana2%2Fpto.c;h=12547832e5dfd4fc1ebc2f59baddbeaa1d5f2636;hb=f274dcf35aa0d3f4748387dbddfe50e8d7d44951;hp=554866e0f6f63e30109726e453a14f2fe36d71e1;hpb=f001e5b3cb89f984c977a9f7d4aef02cc3cc56eb;p=libfirm diff --git a/ir/ana2/pto.c b/ir/ana2/pto.c index 554866e0f..12547832e 100644 --- a/ir/ana2/pto.c +++ b/ir/ana2/pto.c @@ -50,7 +50,7 @@ extern char *spaces; =================================================== */ /* Helper to pto_init */ -static void pto_init_graph_wrapper (graph_info_t *ginfo, void *__unused) +static void pto_init_graph_wrapper (graph_info_t *ginfo, void *_unused) { ir_graph *graph = ginfo->graph; @@ -80,7 +80,7 @@ void pto_init (int lvl) ecg_iterate_graphs (pto_init_graph_wrapper, NULL); /* debugging only */ - spaces = (char*) xmalloc (512 * sizeof (char)); + spaces = xmalloc (512 * sizeof (char)); memset (spaces, ' ', 512); spaces += 511; *spaces = '\0'; @@ -89,8 +89,9 @@ void pto_init (int lvl) set_curr_ctx (get_main_ctx ()); } -void pto_run () +void pto_run (void) { + ir_graph *save; ir_graph *graph = get_irp_main_irg (); pto_reset_graph_pto (graph, 0); @@ -102,19 +103,21 @@ void pto_run () get_type_name (get_entity_owner (get_irg_entity (graph))), get_entity_name (get_irg_entity (graph)))); - /* do we need some kind of environment here? */ - pto_graph (graph, 0); + /* we need some kind of environment here: NULL */ + save = get_current_ir_graph (); + pto_graph (graph, 0, NULL); + set_current_ir_graph (save); DBGPRINT (1, (stdout, "END PTO\n")); } /* Dump all interesting stuff to a bunch of files */ -void pto_dump () +void pto_dump (void) { pto_dump_names ("names.dot"); } -void pto_cleanup () +void pto_cleanup (void) { /* todo: clean up our own mess */ spaces -= 511; /* hope that all changes to spaces are @@ -134,6 +137,21 @@ void pto_cleanup () /* $Log$ + Revision 1.17 2005/01/10 17:26:34 liekweg + fixup printfs, don't put environments on the stack + + Revision 1.16 2004/12/22 14:43:14 beck + made allocations C-like + + Revision 1.15 2004/12/21 14:26:53 beck + removed C99 constructs + + Revision 1.14 2004/12/20 17:41:14 liekweg + __unused -> _unused + + Revision 1.13 2004/12/20 17:34:34 liekweg + fix recursion handling + Revision 1.12 2004/12/02 16:17:51 beck fixed config.h include