X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fstat%2Ffirmstat.c;h=b7951c963a347c11809b4cea92b386f8f8b9dd20;hb=379bdf77d4ec20ca94e12e75aea168479c014bc9;hp=e5dd51d760eaf99e963da720b087a679a0bd96a1;hpb=b451899be294500fe974c6e97febc59cabdda114;p=libfirm diff --git a/ir/stat/firmstat.c b/ir/stat/firmstat.c index e5dd51d76..b7951c963 100644 --- a/ir/stat/firmstat.c +++ b/ir/stat/firmstat.c @@ -601,13 +601,12 @@ static ir_op *stat_get_irn_op(ir_node *node) */ static void undate_block_info(ir_node *node, graph_entry_t *graph) { - ir_op *op = get_irn_op(node); ir_node *block; block_entry_t *b_entry; int i, arity; /* check for block */ - if (op == op_Block) { + if (is_Block(node)) { arity = get_irn_arity(node); b_entry = block_get_entry(&graph->recalc_cnts, get_irn_node_nr(node), graph->block_hash); /* mark start end block to allow to filter them out */ @@ -631,7 +630,7 @@ static void undate_block_info(ir_node *node, graph_entry_t *graph) block = get_nodes_block(node); b_entry = block_get_entry(&graph->recalc_cnts, get_irn_node_nr(block), graph->block_hash); - if (op == op_Phi && mode_is_datab(get_irn_mode(node))) { + if (is_Phi(node) && mode_is_datab(get_irn_mode(node))) { /* count data Phi per block */ cnt_inc(&b_entry->cnt[bcnt_phi_data]); } /* if */ @@ -973,7 +972,7 @@ static unsigned get_adr_mark(graph_entry_t *graph, ir_node *node) static void set_adr_mark(graph_entry_t *graph, ir_node *node, unsigned val) { address_mark_entry_t const value = { node, val }; - set_insert(address_mark_entry_t, graph->address_mark, &value, sizeof(value), hash_ptr(node)); + (void)set_insert(address_mark_entry_t, graph->address_mark, &value, sizeof(value), hash_ptr(node)); } /* set_adr_mark */ #undef DUMP_ADR_MODE @@ -1673,9 +1672,8 @@ static void stat_merge_nodes( /* sometimes we did not detect, that it is replaced by a Const */ if (opt == HOOK_OPT_CONFIRM && new_num_entries == 1) { - ir_op *op = get_irn_op(new_node_array[0]); - - if (op == op_Const || op == op_SymConst) + ir_node *const irn = new_node_array[0]; + if (is_Const(irn) || is_SymConst(irn)) xopt = HOOK_OPT_CONFIRM_C; } /* if */ @@ -2065,10 +2063,10 @@ void stat_dump_snapshot(const char *name, const char *phase) fname[0] = '\0'; p = name; } /* if */ - strncat(fname, "firmstat-", sizeof(fname)-1); - strncat(fname, phase, sizeof(fname)-1); - strncat(fname, "-", sizeof(fname)-1); - strncat(fname, p, sizeof(fname)-1); + strncat(fname, "firmstat-", sizeof(fname)-strlen(fname)-1); + strncat(fname, phase, sizeof(fname)-strlen(fname)-1); + strncat(fname, "-", sizeof(fname)-strlen(fname)-1); + strncat(fname, p, sizeof(fname)-strlen(fname)-1); stat_dump_init(fname);