+block_attr get_irn_block_attr (ir_node *node);
+load_attr get_irn_load_attr (ir_node *node);
+store_attr get_irn_store_attr (ir_node *node);
+except_attr get_irn_except_attr (ir_node *node);
+/** @} */
+
+/**
+ * The amount of additional space for custom data to be allocated upon creating a new node.
+ */
+extern unsigned firm_add_node_size;
+
+/** Set the get_type operation of an ir_op. */
+ir_op *firm_set_default_get_type(ir_op *op);
+
+/*-------------------------------------------------------------------*/
+/* These function are most used in libfirm. Give them as static */
+/* functions so they can be inlined. */
+/*-------------------------------------------------------------------*/
+
+/**
+ * Checks whether a pointer points to a ir node.
+ * Intern version for libFirm.
+ */
+static INLINE int
+_is_ir_node (const void *thing) {
+ return (get_kind(thing) == k_ir_node);
+}
+
+/**
+ * Gets the op of a node.
+ * Intern version for libFirm.
+ */
+static INLINE ir_op *
+_get_irn_op (const ir_node *node) {
+ assert (node);
+ return node->op;
+}
+
+/** Copies all attributes stored in the old node to the new node.
+ Assumes both have the same opcode and sufficient size. */
+static INLINE void
+copy_node_attr(const ir_node *old_node, ir_node *new_node) {
+ ir_op *op = _get_irn_op(old_node);
+
+ /* must always exist */
+ op->copy_attr(old_node, new_node);
+}
+
+/**
+ * Gets the opcode of a node.
+ * Intern version for libFirm.
+ */
+static INLINE opcode
+_get_irn_opcode (const ir_node *node) {
+ assert (k_ir_node == get_kind(node));
+ assert (node->op);
+ return node->op->code;
+}
+
+/**
+ * Returns the number of predecessors without the block predecessor.
+ * Intern version for libFirm.
+ */
+static INLINE int
+_get_irn_intra_arity (const ir_node *node) {
+ assert(node);
+ return ARR_LEN(node->in) - 1;
+}
+
+/**
+ * Returns the number of predecessors without the block predecessor.
+ * Intern version for libFirm.
+ */
+static INLINE int
+_get_irn_inter_arity (const ir_node *node) {
+ assert(node);
+ if (_get_irn_opcode(node) == iro_Filter) {
+ assert(node->attr.filter.in_cg);
+ return ARR_LEN(node->attr.filter.in_cg) - 1;
+ } else if (_get_irn_opcode(node) == iro_Block && node->attr.block.in_cg) {
+ return ARR_LEN(node->attr.block.in_cg) - 1;
+ }
+ return _get_irn_intra_arity(node);
+}
+
+/**
+ * Returns the number of predecessors without the block predecessor.
+ * Intern version for libFirm.
+ */
+extern int (*_get_irn_arity)(const ir_node *node);
+
+/**
+ * Intern version for libFirm.
+ */
+static INLINE ir_node *
+_get_irn_intra_n (const ir_node *node, int n) {
+ assert(node); assert(-1 <= n && n < _get_irn_intra_arity(node));
+
+ return (node->in[n + 1] = skip_Id(node->in[n + 1]));
+}
+
+/**
+ * Intern version for libFirm.
+ */
+static INLINE ir_node*
+_get_irn_inter_n (const ir_node *node, int n) {
+ assert(node); assert(-1 <= n && n < _get_irn_inter_arity(node));
+
+ /* handle Filter and Block specially */
+ if (_get_irn_op(node) == op_Filter) {
+ assert(node->attr.filter.in_cg);
+ return (node->attr.filter.in_cg[n + 1] = skip_Id(node->attr.filter.in_cg[n + 1]));
+ } else if (_get_irn_op(node) == op_Block && node->attr.block.in_cg) {
+ return (node->attr.block.in_cg[n + 1] = skip_Id(node->attr.block.in_cg[n + 1]));
+ }
+
+ return _get_irn_intra_n (node, n);
+}
+
+/**
+ * Access to the predecessors of a node.
+ * To iterate over the operands iterate from 0 to i < get_irn_arity(),
+ * to iterate including the Block predecessor iterate from i = -1 to
+ * i < get_irn_arity.
+ * If it is a block, the entry -1 is NULL.
+ * Intern version for libFirm.
+ */
+extern ir_node *(*_get_irn_n)(const ir_node *node, int n);
+
+/**
+ * Gets the mode of a node.
+ * Intern version for libFirm.
+ */
+static INLINE ir_mode *
+_get_irn_mode (const ir_node *node)
+{
+ assert (node);
+ return node->mode;
+}
+
+/**
+ * Sets the mode of a node.
+ * Intern version of libFirm.
+ */
+static INLINE void
+_set_irn_mode (ir_node *node, ir_mode *mode)
+{
+ assert (node);
+ node->mode = mode;
+}
+
+/**
+ * Gets the visited counter of a node.
+ * Intern version for libFirm.
+ */
+static INLINE unsigned long
+_get_irn_visited (const ir_node *node)
+{
+ assert (node);
+ return node->visited;
+}
+
+/**
+ * Sets the visited counter of a node.
+ * Intern version for libFirm.
+ */
+static INLINE void
+_set_irn_visited (ir_node *node, unsigned long visited)
+{
+ assert (node);
+ node->visited = visited;
+}
+
+/**
+ * Mark a node as visited in a graph.
+ * Intern version for libFirm.
+ */
+static INLINE void
+_mark_irn_visited (ir_node *node) {
+ assert (node);
+ node->visited = current_ir_graph->visited;
+}
+
+/**
+ * Returns non-zero if a node of was visited.
+ * Intern version for libFirm.
+ */
+static INLINE int
+_irn_visited(const ir_node *node) {
+ assert (node);
+ return (node->visited >= current_ir_graph->visited);
+}
+
+/**
+ * Returns non-zero if a node of was NOT visited.
+ * Intern version for libFirm.
+ */
+static INLINE int
+_irn_not_visited(const ir_node *node) {
+ assert (node);
+ return (node->visited < current_ir_graph->visited);
+}
+
+/**
+ * Sets the link of a node.
+ * Intern version of libFirm.
+ */
+static INLINE void
+_set_irn_link(ir_node *node, void *link) {
+ assert (node);
+ /* Link field is used for Phi construction and various optimizations
+ in iropt. */
+ assert(get_irg_phase_state(current_ir_graph) != phase_building);
+
+ node->link = link;
+}
+
+/**
+ * Returns the link of a node.
+ * Intern version of libFirm.
+ */
+static INLINE void *
+_get_irn_link(const ir_node *node) {
+ assert (node && _is_ir_node(node));
+ return node->link;
+}
+
+/**
+ * Returns the pinned state of a node.
+ * Intern version of libFirm.
+ */
+static INLINE op_pin_state
+_get_irn_pinned(const ir_node *node) {
+ op_pin_state state;
+ assert(node && _is_ir_node(node));
+ state = _get_op_pinned(_get_irn_op(node));
+ if (state >= op_pin_state_exc_pinned)
+ return get_opt_fragile_ops() ? node->attr.except.pin_state : op_pin_state_pinned;
+ return state;
+}
+
+static INLINE int
+_is_unop(const ir_node *node) {
+ assert(node && _is_ir_node(node));
+ return (node->op->opar == oparity_unary);
+}
+
+static INLINE int
+_is_binop(const ir_node *node) {
+ assert(node && _is_ir_node(node));
+ return (node->op->opar == oparity_binary);
+}
+
+static INLINE int
+_is_Bad(const ir_node *node) {
+ assert(node);
+ return (node && _get_irn_op(node) == op_Bad);
+}
+
+static INLINE int
+_is_Const(const ir_node *node) {
+ assert(node);
+ return (node && _get_irn_op(node) == op_Const);
+}
+
+static INLINE int
+_is_Unknown (const ir_node *node) {
+ assert(node);
+ return (node && _get_irn_op(node) == op_Unknown);
+}
+
+static INLINE int
+_is_no_Block(const ir_node *node) {
+ assert(node && _is_ir_node(node));
+ return (_get_irn_op(node) != op_Block);
+}
+
+static INLINE int
+_is_Block(const ir_node *node) {
+ assert(node && _is_ir_node(node));
+ return (_get_irn_op(node) == op_Block);
+}
+
+static INLINE unsigned long
+_get_Block_block_visited (ir_node *node) {
+ assert (node->op == op_Block);
+ return node->attr.block.block_visited;
+}
+
+static INLINE void
+_set_Block_block_visited (ir_node *node, unsigned long visit) {
+ assert (node->op == op_Block);
+ node->attr.block.block_visited = visit;
+}
+
+/* For this current_ir_graph must be set. */
+static INLINE void
+_mark_Block_block_visited (ir_node *node) {
+ assert (node->op == op_Block);
+ node->attr.block.block_visited = get_irg_block_visited(current_ir_graph);
+}
+
+static INLINE int
+_Block_not_block_visited(ir_node *node) {
+ assert (node->op == op_Block);
+ return (node->attr.block.block_visited < get_irg_block_visited(current_ir_graph));
+}
+
+static INLINE ir_node *
+_set_Block_dead(ir_node *block) {
+ assert(_get_irn_op(block) == op_Block);
+ block->attr.block.dead = 1;
+ return block;
+}
+
+static INLINE int
+_is_Block_dead(const ir_node *block) {
+ ir_op * op = _get_irn_op(block);
+
+ if (op == op_Bad)
+ return 1;
+ else {
+ assert(op == op_Block);
+ return block->attr.block.dead;
+ }
+}
+
+static INLINE tarval *_get_Const_tarval (ir_node *node) {
+ assert (_get_irn_op(node) == op_Const);
+ return node->attr.con.tv;
+}
+
+static INLINE cnst_classify_t _classify_Const(ir_node *node) {
+ ir_op *op;
+ assert(_is_ir_node(node));
+
+ op = _get_irn_op(node);
+
+ if(op == op_Const)
+ return classify_tarval(_get_Const_tarval(node));
+ else if(op == op_SymConst)
+ return CNST_SYMCONST;
+
+ return CNST_NO_CONST;
+}
+
+static INLINE type *_get_irn_type(ir_node *node) {
+ return _get_irn_op(node)->get_type(node);
+}
+
+/* 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)
+#define get_irn_inter_arity(node) _get_irn_inter_arity(node)
+#define get_irn_arity(node) _get_irn_arity(node)
+#define get_irn_intra_n(node, n) _get_irn_intra_n(node, n)
+#define get_irn_inter_n(node, n) _get_irn_inter_n(node, n)
+#define get_irn_n(node, n) _get_irn_n(node, n)
+#define get_irn_mode(node) _get_irn_mode(node)
+#define set_irn_mode(node, mode) _set_irn_mode(node, mode)
+#define get_irn_op(node) _get_irn_op(node)
+#define get_irn_opcode(node) _get_irn_opcode(node)
+#define get_irn_visited(node) _get_irn_visited(node)
+#define set_irn_visited(node, v) _set_irn_visited(node, v)
+#define mark_irn_visited(node) _mark_irn_visited(node)
+#define irn_visited(node) _irn_visited(node)
+#define irn_not_visited(node) _irn_not_visited(node)
+#define set_irn_link(node, link) _set_irn_link(node, link)
+#define get_irn_link(node) _get_irn_link(node)
+#define is_unop(node) _is_unop(node)
+#define is_binop(node) _is_binop(node)
+#define is_Const(node) _is_Const(node)
+#define is_Unknown(node) _is_Unknown(node)
+#define is_Bad(node) _is_Bad(node)
+#define is_no_Block(node) _is_no_Block(node)
+#define is_Block(node) _is_Block(node)
+#define get_Block_block_visited(node) _get_Block_block_visited(node)
+#define set_Block_block_visited(node, visit) _set_Block_block_visited(node, visit)
+#define mark_Block_block_visited(node) _mark_Block_block_visited(node)
+#define Block_not_block_visited(node) _Block_not_block_visited(node)
+#define set_Block_dead(block) _set_Block_dead(block)
+#define is_Block_dead(block) _is_Block_dead(block)
+#define get_Const_tarval(node) _get_Const_tarval(node)
+#define classify_Const(node) _classify_Const(node)
+#define get_irn_type(node) _get_irn_type(node)