added skip_Pin()
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sun, 24 Aug 2008 10:57:37 +0000 (10:57 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sun, 24 Aug 2008 10:57:37 +0000 (10:57 +0000)
[r21401]

include/libfirm/irnode.h
ir/ir/irnode.c

index ddc44fe..c62ad95 100644 (file)
@@ -1238,9 +1238,11 @@ ir_node *skip_Id(ir_node *node);   /* Old name is skip_nop(). */
 /** Returns corresponding operand of Tuple if node is a Proj from
    a Tuple. */
 ir_node *skip_Tuple(ir_node *node);
-/** returns operand of node if node is a Cast. */
+/** Returns operand of node if node is a Cast. */
 ir_node *skip_Cast(ir_node *node);
 const ir_node *skip_Cast_const(const ir_node *node);
+/** Returns operand of node if node is a Pin. */
+ir_node *skip_Pin(ir_node *node);
 /** Returns operand of node if node is a Confirm */
 ir_node *skip_Confirm(ir_node *node);
 /** Skip all high-level Operations (including Cast, Confirm). */
index 505d61e..29d2c7d 100644 (file)
@@ -2530,6 +2530,13 @@ const ir_node *skip_Cast_const(const ir_node *node) {
        return node;
 }
 
+/* returns operand of node if node is a Pin */
+ir_node *skip_Pin(ir_node *node) {
+       if (is_Pin(node))
+               return get_Pin_op(node);
+       return node;
+}
+
 /* returns operand of node if node is a Confirm */
 ir_node *skip_Confirm(ir_node *node) {
        if (get_irn_op(node) == op_Confirm)