X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firdump.c;h=0026f0ec1d3f574c472ef36838d6a347ae2663ab;hb=31ef53136fdb86d4a98919c2148c95cadea4ea81;hp=9f94510468024c7ff2d4252491d88406cada2bcf;hpb=bc6a704a4833b7f9462546f15d11a75ec301d037;p=libfirm diff --git a/ir/ir/irdump.c b/ir/ir/irdump.c index 9f9451046..0026f0ec1 100644 --- a/ir/ir/irdump.c +++ b/ir/ir/irdump.c @@ -651,8 +651,9 @@ static ir_node **construct_block_lists(ir_graph *irg) { current_ir_graph = irg; - if(walk_flag) + if(walk_flag) { ir_free_resources(irg, IR_RESOURCE_IRN_VISITED); + } for (i = get_irp_n_irgs() - 1; i >= 0; --i) ird_set_irg_link(get_irp_irg(i), NULL); @@ -673,8 +674,9 @@ static ir_node **construct_block_lists(ir_graph *irg) { set_interprocedural_view(rem_view); #endif - if(walk_flag) + if(walk_flag) { ir_reserve_resources(irg, IR_RESOURCE_IRN_VISITED); + } current_ir_graph = rem; return ird_get_irg_link(irg); @@ -694,7 +696,7 @@ static list_tuple *construct_extblock_lists(ir_graph *irg) { ir_node **blk_list = construct_block_lists(irg); int i; ir_graph *rem = current_ir_graph; - list_tuple *lists = xmalloc(sizeof(*lists)); + list_tuple *lists = XMALLOC(list_tuple); current_ir_graph = irg; @@ -1292,7 +1294,7 @@ static void dump_node_vcgattr(FILE *F, ir_node *node, ir_node *local, int bad) /* Adds a new node info dumper callback. */ void *dump_add_node_info_callback(dump_node_info_cb_t *cb, void *data) { - hook_entry_t *info = xmalloc(sizeof(*info)); + hook_entry_t *info = XMALLOC(hook_entry_t); info->hook._hook_node_info = cb; info->context = data; @@ -1354,7 +1356,7 @@ static void dump_const_node_local(FILE *F, ir_node *n) { for (i = 0; i < get_irn_arity(n); i++) { ir_node *con = get_irn_n(n, i); - if (is_constlike_node(con) && irn_not_visited(con)) { + if (is_constlike_node(con) && !irn_visited(con)) { int bad = 0; mark_irn_visited(con); @@ -2375,7 +2377,7 @@ FILE *vcg_open(ir_graph *irg, const char * suffix1, const char *suffix2) { if (!suffix2) suffix2 = ""; /* open file for vcg graph */ - fname = xmalloc (len * 2 + strlen(suffix1) + strlen(suffix2) + 5); + fname = XMALLOCN(char, len * 2 + strlen(suffix1) + strlen(suffix2) + 5); /* strncpy (fname, nm, len); */ /* copy the filename */ j = 0; @@ -2419,7 +2421,7 @@ FILE *vcg_open_name(const char *name, const char *suffix) { if (!suffix) suffix = ""; /** open file for vcg graph */ - fname = xmalloc(len * 2 + 5 + strlen(suffix)); + fname = XMALLOCN(char, len * 2 + 5 + strlen(suffix)); /* strcpy (fname, name);*/ /* copy the filename */ j = 0; for (i = 0; i < len; ++i) { /* replace '/' in the name: escape by @. */