From a09bdfaee4070c41dfe3b9d4f39b23113cf93629 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Sun, 24 Aug 2008 10:57:37 +0000 Subject: [PATCH] added skip_Pin() [r21401] --- include/libfirm/irnode.h | 4 +++- ir/ir/irnode.c | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/libfirm/irnode.h b/include/libfirm/irnode.h index ddc44fe18..c62ad953c 100644 --- a/include/libfirm/irnode.h +++ b/include/libfirm/irnode.h @@ -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). */ diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index 505d61ede..29d2c7d42 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -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) -- 2.20.1