Commit 2f2aa72f authored by Matthias Braun's avatar Matthias Braun
Browse files

added a skip_Proj_const...

[r8460]
parent 9db0e964
......@@ -2376,11 +2376,25 @@ get_irn_irg(const ir_node *node) {
ir_node *
skip_Proj (ir_node *node) {
/* don't assert node !!! */
if (node != NULL && is_Proj(node)) {
return get_Proj_pred(node);
} else {
return (ir_node*) node;
}
if (node == NULL)
return NULL;
if (is_Proj(node))
node = get_Proj_pred(node);
return node;
}
const ir_node *
skip_Proj_const (const ir_node *node) {
/* don't assert node !!! */
if (node == NULL)
return NULL;
if (is_Proj(node))
node = get_Proj_pred(node);
return node;
}
ir_node *
......
......@@ -1111,6 +1111,8 @@ void set_Pin_op(ir_node *pin, ir_node *node);
/** returns operand of node if node is a Proj. */
ir_node *skip_Proj(ir_node *node);
/** returns operand of node if node is a Proj. */
const ir_node *skip_Proj_const(const ir_node *node);
/** returns operand of node if node is a Id */
ir_node *skip_Id(ir_node *node); /* Old name is skip_nop(). */
/** returns corresponding operand of Tuple if node is a Proj from
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment