Commit 110bd12d authored by Michael Beck's avatar Michael Beck
Browse files

skip_HighLevel() added

cleaned up

[r5888]
parent b1446ee8
......@@ -2042,13 +2042,25 @@ skip_Tuple (ir_node *node) {
return 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) {
if (node && get_irn_op(node) == op_Cast) {
return skip_Id(get_irn_n(node, 0));
} else {
return node;
}
return get_Cast_op(node);
return node;
}
/* returns operand of node if node is a Confirm */
ir_node *skip_Confirm (ir_node *node) {
if (node && get_irn_op(node) == op_Confirm) {
return get_Confirm_value(node);
return node;
}
/* skip all high-level ops */
ir_node *skip_HighLevel(ir_node *node) {
if (node && is_op_highlevel(get_irn_op(node)))
return get_irn_n(node, 0);
return node;
}
#if 0
......
......@@ -904,6 +904,10 @@ ir_node *skip_Id (ir_node *node); /* Same as skip_nop. */
ir_node *skip_Tuple (ir_node *node);
/** returns operand of node if node is a Cast */
ir_node *skip_Cast (ir_node *node);
/** returns operand of node if node is a Confirm */
ir_node *skip_Confirm (ir_node *node);
/** Skip all high-level Operations. */
ir_node *skip_HighLevel(ir_node *node);
/** returns true if irn is a Const node. */
int is_Const(const ir_node *node);
/** returns true if node is a Bad node. */
......
Supports Markdown
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