+/**
+ * Returns whether the node _always_ must be pinned.
+ * I.e., the node is not floating after global cse.
+ *
+ * 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));
+ /* Check opcode */
+ 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 op_pin_state
+_is_irn_pinned_in_irg(const ir_node *node) {
+ if (get_irg_pinned(get_irn_irg(node)) == op_pin_state_floats)
+ return get_irn_pinned(node);
+ return op_pin_state_pinned;
+}
+
+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 int
+_get_Block_n_cfgpreds (ir_node *node) {
+ assert(_is_Block(node));
+ return _get_irn_arity(node);
+}
+
+static INLINE ir_node *
+_get_Block_cfgpred (ir_node *node, int pos) {
+ assert(0 <= pos && pos < get_irn_arity(node));
+ assert(_is_Block(node));
+ return _get_irn_n(node, pos);
+}
+
+/* Get the predecessor block.
+ *
+ * Returns the block corresponding to the predecessor pos.
+ *
+ * There are several ambiguities we resolve with this function:
+ * - The direct predecessor can be a Proj, which is not pinned.
+ * We walk from the predecessor to the next pinned node
+ * (skip_Proj) and return the block that node is in.
+ * - If we encounter the Bad node, this function does not return
+ * Start, but the Bad node.
+ */
+static INLINE ir_node *
+_get_Block_cfgpred_block(ir_node *node, int pos) {
+ ir_node *res = skip_Proj(get_Block_cfgpred(node, pos));
+ if (!is_Bad(res))
+ res = get_nodes_block(res);
+ return res;
+}
+
+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 int _is_irn_forking(const ir_node *node) {
+ return is_op_forking(_get_irn_op(node));
+}
+
+static INLINE ir_type *_get_irn_type(ir_node *node) {
+ return _get_irn_op(node)->ops.get_type(node);
+}
+
+static INLINE ir_type *_get_irn_type_attr(ir_node *node) {
+ return _get_irn_op(node)->ops.get_type_attr(node);
+}
+
+static INLINE entity *_get_irn_entity_attr(ir_node *node) {
+ return _get_irn_op(node)->ops.get_entity_attr(node);
+}
+
+static INLINE int _is_irn_constlike(const ir_node *node) {
+ return is_op_constlike(_get_irn_op(node));
+}
+
+static INLINE int _is_irn_keep(const ir_node *node) {
+ return is_op_keep(_get_irn_op(node));
+}
+
+static INLINE cond_jmp_predicate _get_Cond_jmp_pred(ir_node *node) {
+ assert (_get_irn_op(node) == op_Cond);
+ return node->attr.c.pred;
+}
+
+static INLINE void _set_Cond_jmp_pred(ir_node *node, cond_jmp_predicate pred) {
+ assert (_get_irn_op(node) == op_Cond);
+ node->attr.c.pred = pred;
+}
+