3 * File name: ir/ir/firmstat.c
4 * Purpose: Statistics for Firm.
8 * Copyright: (c) 2004 Universität Karlsruhe
9 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
19 # include "irnode_t.h"
24 * 64 bit should be enough for now
26 #define STAT_CNT_NUM 2
28 typedef struct _counter_t {
29 unsigned cnt[STAT_CNT_NUM];
33 static INLINE cnt_inc(counter_t *cnt)
37 for (i = 0; i < STAT_CNT_NUM; ++i) {
42 static INLINE cnt_dec(counter_t *cnt)
46 for (i = 0; i < STAT_CNT_NUM; ++i) {
47 if (--cnt->cnt[i] != -1)
51 /* A new IR op is registered. */
52 void stat_new_ir_op(const ir_op *op)
56 /* An IR op is freed. */
57 void stat_free_ir_op(const ir_op *op)
61 /* initialize the statistics module. */
66 /* A new node is created. */
67 void stat_new_node(const ir_node *node)