+/**
+ * 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);
+}