From: Götz Lindenmaier Date: Sat, 25 Sep 2004 11:14:16 +0000 (+0000) Subject: initialization, X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=248e2d8e31ec852fc9809859bed12f7a5750c28a;p=libfirm initialization, field for cache optimization [r3947] --- diff --git a/ir/tr/type.c b/ir/tr/type.c index e8ba17383..55cf8c589 100644 --- a/ir/tr/type.c +++ b/ir/tr/type.c @@ -103,6 +103,7 @@ new_type(tp_op *type_op, ir_mode *mode, ident* name) { node_size = offsetof(type, attr) + type_op->attr_size; res = (type *) xmalloc (node_size); + memset((void *)res, 0, node_size); add_irp_type(res); /* Remember the new type global. */ res->kind = k_type; diff --git a/ir/tr/type_t.h b/ir/tr/type_t.h index 8e2d166e3..6accd233a 100644 --- a/ir/tr/type_t.h +++ b/ir/tr/type_t.h @@ -126,6 +126,10 @@ struct type { void *link; /**< holds temporary data - like in irnode_t.h */ struct dbg_info* dbi; /**< A pointer to information for debug support. */ + /* ------------- fields for analyses ---------------*/ + ir_node **allocations; /**< array of all Alloc nodes with this type + @@@ Should not be in here, hash table! */ + #ifdef DEBUG_libfirm int nr; /**< a unique node number for each node to make output readable. */