X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fstat%2Ffirmstat.c;h=d897bbf08760cfa341424114d770ef4cde7f10e2;hb=f8cc15664f571aa7ef89d6f6bc8d5bd2b8ca7d53;hp=3dffface236529ac45b9be41c10b2b17357e449f;hpb=a9950b7e54fec21e54067548ba9748a298d20e55;p=libfirm diff --git a/ir/stat/firmstat.c b/ir/stat/firmstat.c index 3dffface2..d897bbf08 100644 --- a/ir/stat/firmstat.c +++ b/ir/stat/firmstat.c @@ -21,12 +21,9 @@ * @file * @brief Statistics for Firm. * @author Michael Beck - * @version $Id$ */ #include "config.h" -#ifdef FIRM_STATISTICS - #include #include #include @@ -598,7 +595,7 @@ static ir_op *stat_get_irn_op(ir_node *node) } /* if */ break; default: - ; + break; } /* switch */ return op; @@ -948,7 +945,7 @@ end_parameter: ; } /* if */ } /* if */ default: - ; + break; } /* switch */ } /* stat_update_address */ @@ -1003,7 +1000,7 @@ static void update_node_stat(ir_node *node, void *env) } } default: - ; + break; } /* switch */ /* we want to count the constant IN nodes, not the CSE'ed constant's itself */ @@ -1307,8 +1304,7 @@ static void update_graph_stat_2(graph_entry_t *global, graph_entry_t *graph) static void stat_register_dumper(const dumper_t *dumper) { dumper_t *p = XMALLOC(dumper_t); - - memcpy(p, dumper, sizeof(*p)); + *p = *dumper; p->next = status->dumper; p->status = status; @@ -1431,7 +1427,7 @@ void stat_register_dumper_func(dump_graph_FUNC func) /* * Helper: get an ir_op from an opcode. */ -ir_op *stat_get_op_from_opcode(ir_opcode code) +ir_op *stat_get_op_from_opcode(unsigned code) { return opcode_find_entry(code, status->ir_op_hash); } /* stat_get_op_from_opcode */ @@ -2452,16 +2448,3 @@ int stat_is_active(void) { return status != (stat_info_t *)&status_disable; } /* stat_is_active */ - -#else - -/* initialize the statistics module. */ -void firm_init_stat(unsigned enable_options) {} - -/* Dumps a statistics snapshot */ -void stat_dump_snapshot(const char *name, const char *phase) {} - -/* terminates the statistics module, frees all memory */ -void stat_term(void); - -#endif /* FIRM_STATISTICS */