X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana2%2Firmemwalk.c;h=bbb8e3701098218d79db2bc0772ee21ba20e3e95;hb=d0d85962ef52c14950db90e5981a7bea36023ab3;hp=13ee10b9a19c6ae5047d16f3008bb1b5e10c509e;hpb=f001e5b3cb89f984c977a9f7d4aef02cc3cc56eb;p=libfirm diff --git a/ir/ana2/irmemwalk.c b/ir/ana2/irmemwalk.c index 13ee10b9a..bbb8e3701 100644 --- a/ir/ana2/irmemwalk.c +++ b/ir/ana2/irmemwalk.c @@ -24,9 +24,11 @@ # include "config.h" # endif +# include "irnode_t.h" # include "irgwalk.h" /* for irg_walk_func */ # include "irprog.h" /* for get_irp_main_irg */ # include "xmalloc.h" +# include "gnu_ext.h" # ifndef TRUE # define TRUE 1 @@ -37,15 +39,16 @@ Data */ -/* environment for a single memory walker */ +/** environment for a single memory walker */ typedef struct walk_mem_env_str { - ir_graph *graph; /* the graph we're visiting */ - int visited; /* 'visited' marker */ - irg_walk_func *pre; /* pre action */ - irg_walk_func *post; /* post action */ - void *env; /* user-defined environment */ - - struct walk_mem_env_str *prev; /* link up walking instances */ + ir_graph *graph; /**< the graph we're visiting */ + unsigned long visited; /**< 'visited' marker + (unsigned long in case we walk more than 2^32 graphs) */ + irg_walk_func *pre; /**< pre action */ + irg_walk_func *post; /**< post action */ + void *env; /**< user-defined environment */ + + struct walk_mem_env_str *prev; /**< link up walking instances */ /* what else? */ } walk_mem_env_t; @@ -219,7 +222,7 @@ void irg_walk_mem (ir_graph *graph, void *env) { ir_node *end_block = get_irg_end_block (graph); - walk_mem_env_t *walk_env = (walk_mem_env_t*) xmalloc (sizeof (walk_mem_env_t)); + walk_mem_env_t *walk_env = xmalloc (sizeof (walk_mem_env_t)); assert (! get_irg_is_mem_visited (graph)); @@ -261,6 +264,22 @@ void irg_walk_mem (ir_graph *graph, /* $Log$ + Revision 1.11 2005/01/26 12:20:20 beck + gnu_ext.h included + + Revision 1.10 2005/01/14 13:34:48 liekweg + Don't cast malloc + + Revision 1.9 2005/01/10 17:26:34 liekweg + fixup printfs, don't put environments on the stack + + Revision 1.8 2004/12/22 14:43:14 beck + made allocations C-like + + Revision 1.7 2004/12/21 14:25:35 beck + removed C99 constructs + make visit counter of same type as irn visit counter + Revision 1.6 2004/12/02 16:17:51 beck fixed config.h include