remove $Id$, it doesn't work with git anyway
[libfirm] / ir / stat / firmstat.c
index 3dfffac..d897bbf 100644 (file)
  * @file
  * @brief   Statistics for Firm.
  * @author  Michael Beck
- * @version $Id$
  */
 #include "config.h"
 
-#ifdef FIRM_STATISTICS
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -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 */