X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firnode_t.h;h=1ec1f16529e4f7456c22ff4f639a0391e36b6a0a;hb=fed1bdc07c9ec7b4d07a9243ad093c9fdd239fbd;hp=817071a7581075bed6ff1e6f7a438044433b23a3;hpb=6ce54897086db42a2f4a59d946e9895954cc9ef3;p=libfirm diff --git a/ir/ir/irnode_t.h b/ir/ir/irnode_t.h index 817071a75..1ec1f1652 100644 --- a/ir/ir/irnode_t.h +++ b/ir/ir/irnode_t.h @@ -240,18 +240,19 @@ struct ir_node { ir_mode *mode; /**< Mode of this node. */ struct ir_node **in; /**< array with predecessors / operands */ unsigned long visited; /**< visited counter for walks of the graph */ + unsigned node_idx; /**< the node index of this node in its graph */ void *link; /**< to attach additional information to the node, e.g. used while construction to link Phi0 nodes and - during optimization to link to nodes that - shall replace a node. */ + during optimization to link to nodes that + shall replace a node. */ /* ------- Fields for optimizations / analysis information ------- */ struct ir_node **out; /**< @deprecated array of out edges. */ struct dbg_info* dbi; /**< A pointer to information for debug support. */ /* ------- For debugging ------- */ #ifdef DEBUG_libfirm - int out_valid; + int out_valid; long node_nr; /**< a unique node number for each node to make output - readable. */ + readable. */ #endif /* ------- For analyses -------- */ ir_loop *loop; /**< the loop the node is in. Access routines in irloop.h */ @@ -796,6 +797,10 @@ static INLINE int _get_Psi_n_conds(ir_node *node) { return _get_irn_arity(node) >> 1; } +static INLINE unsigned _get_irn_idx(const ir_node *node) { + return node->node_idx; +} + /* this section MUST contain all inline functions */ #define is_ir_node(thing) _is_ir_node(thing) #define get_irn_intra_arity(node) _get_irn_intra_arity(node) @@ -852,5 +857,6 @@ static INLINE int _get_Psi_n_conds(ir_node *node) { #define get_Cond_jmp_pred(node) _get_Cond_jmp_pred(node) #define set_Cond_jmp_pred(node, pred) _set_Cond_jmp_pred(node, pred) #define get_Psi_n_conds(node) _get_Psi_n_conds(node) +#define get_irn_idx(node) _get_irn_idx(node) # endif /* _IRNODE_T_H_ */