Commit db2f47e7 authored by Sebastian Hack's avatar Sebastian Hack
Browse files

Added is_Const

[r5464]
parent afa42cd0
......@@ -2123,6 +2123,11 @@ int
return _is_Bad(node);
}
int
(is_Const)(const ir_node *node) {
return _is_Const(node);
}
int
(is_no_Block)(const ir_node *node) {
return _is_no_Block(node);
......
......@@ -896,6 +896,8 @@ 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 true if irn is a Const node. */
int is_Const(const ir_node *node);
/** returns true if node is a Bad node. */
int is_Bad (const ir_node *node);
/** returns true if the node is not a Block */
......
......@@ -525,6 +525,12 @@ _is_Bad(const ir_node *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_no_Block(const ir_node *node) {
assert(node && _is_ir_node(node));
......@@ -625,6 +631,7 @@ static INLINE type *_get_irn_type(ir_node *node) {
#define get_irn_link(node) _get_irn_link(node)
#define is_unop(node) _is_unop(node)
#define is_binop(node) _is_binop(node)
#define is_Const(node) _is_Const(node)
#define is_Bad(node) _is_Bad(node)
#define is_no_Block(node) _is_no_Block(node)
#define is_Block(node) _is_Block(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