From: Götz Lindenmaier Date: Thu, 22 Jul 2004 15:53:39 +0000 (+0000) Subject: more heapanalysis support X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=df9f7454bdc1add95a34ad34464ab91ba5f719a0;p=libfirm more heapanalysis support [r3556] --- diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index ff0aff091..581268263 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -352,6 +352,26 @@ void * return __get_irn_link(node); } + +#ifdef DO_HEAPANALYSIS +/* Access the abstract interpretation information of a node. + Returns NULL if no such information is available. */ +struct abstval *get_irn_abst_value(ir_node *n) { + return n->av; +} +/* Set the abstract interpretation information of a node. */ +void set_irn_abst_value(ir_node *n, struct abstval *os) { + n->av = os; +} +struct section *firm_get_irn_section(ir_node *n) { + return n->sec; +} +void firm_set_irn_section(ir_node *n, struct section *s) { + n->sec = s; +} +#endif /* DO_HEAPANALYSIS */ + + /* Outputs a unique number for this node */ long get_irn_node_nr(const ir_node *node) { diff --git a/ir/ir/irnode_t.h b/ir/ir/irnode_t.h index 6b470ced4..560476563 100644 --- a/ir/ir/irnode_t.h +++ b/ir/ir/irnode_t.h @@ -214,6 +214,10 @@ struct ir_node { #endif /* ------- For analyses -------- */ ir_loop *loop; /**< the loop the node is in. Access routines in irloop.h */ +#ifdef DO_HEAPANALYSIS + struct abstval *av; + struct section *sec; +#endif /* ------- Opcode depending fields -------- */ attr attr; /**< attribute of this node. Depends on opcode. Must be last field of struct ir_node. */