+/**
+ * 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);
+ 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 = __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) {
+ return (node->op->opar == oparity_unary);
+}
+
+static INLINE int
+__is_binop(const 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_no_Block(const ir_node *node) {
+ assert(node);
+ return (__get_irn_op(node) != op_Block);
+}
+
+static INLINE int
+__is_Block(const ir_node *node) {
+ assert(node);
+ return (__get_irn_op(node) == op_Block);
+}
+
+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;
+ }
+}