From: Michael Beck Date: Mon, 19 Apr 2004 13:10:11 +0000 (+0000) Subject: first statistic hooks added X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=897fa7894e7573096bbf04746b422f3ee5ec511b;p=libfirm first statistic hooks added [r2681] --- diff --git a/ir/ir/Makefile.in b/ir/ir/Makefile.in index d72e8ed89..bb336a41f 100644 --- a/ir/ir/Makefile.in +++ b/ir/ir/Makefile.in @@ -32,7 +32,8 @@ include $(topdir)/MakeRules CPPFLAGS += -I$(top_srcdir)/ir/adt -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/common \ -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/tr -I$(top_srcdir)/ir/tv \ - -I$(top_srcdir)/ir/debug -I$(top_srcdir)/ir/ana -I$(top_srcdir)/ir/st + -I$(top_srcdir)/ir/debug -I$(top_srcdir)/ir/ana -I$(top_srcdir)/ir/st \ + -I$(top_srcdir)/ir/stat include $(top_srcdir)/MakeTargets diff --git a/ir/ir/irgmod.c b/ir/ir/irgmod.c index a46d618a2..c46122224 100644 --- a/ir/ir/irgmod.c +++ b/ir/ir/irgmod.c @@ -102,9 +102,10 @@ void collect_phiprojs(ir_graph *irg) { /* Functionality for part_block */ /*--------------------------------------------------------------------*/ -/* Moves node and all predecessors of node from from_bl to to_bl. - Does not move predecessors of Phi nodes (or block nodes). */ - +/** + * Moves node and all predecessors of node from from_bl to to_bl. + * Does not move predecessors of Phi nodes (or block nodes). + */ static void move (ir_node *node, ir_node *from_bl, ir_node *to_bl) { int i; ir_node *proj, *pred; diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index d8058cb39..cfeb23bd6 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -25,9 +25,10 @@ #include "irdump.h" #include "irflag_t.h" #include "irop_t.h" - #include "irprog_t.h" +#include "firmstat.h" + /* some constants fixing the positions of nodes predecessors in the in array */ #define CALL_PARAM_OFFSET 2 @@ -135,6 +136,8 @@ new_ir_node (dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op, ir_mode *mo res->node_nr = get_irp_new_node_nr(); #endif + stat_new_node(res); + return res; } diff --git a/ir/ir/irop.c b/ir/ir/irop.c index a240074c2..0c0833762 100644 --- a/ir/ir/irop.c +++ b/ir/ir/irop.c @@ -18,6 +18,7 @@ # include "irop_t.h" # include "irnode_t.h" +# include "firmstat.h" # include "xmalloc.h" @@ -97,10 +98,12 @@ new_ir_op(opcode code, const char *name, op_pinned p, unsigned flags, op_arity o res->op_index = op_index; firm_set_default_operations(res); + stat_new_ir_op(res); return res; } void free_ir_op(ir_op *code) { + stat_free_ir_op(code); free(code); }