Commit 7af00ed6 authored by Michael Beck's avatar Michael Beck
Browse files

is_irn_constlike() added

renamed is_forking_op() to is_irn_forking()

[r6616]
parent 99d5b69d
......@@ -2251,15 +2251,19 @@ ir_node *get_fragile_op_mem(ir_node *node) {
}
/* Returns true if the operation is a forking control flow operation. */
int
is_forking_op(const ir_node *node) {
return is_op_forking(get_irn_op(node));
int (is_irn_forking)(const ir_node *node) {
return _is_irn_forking(node);
}
type *(get_irn_type)(ir_node *node) {
return _get_irn_type(node);
}
/* Returns non-zero for constant-like nodes. */
int (is_irn_constlike)(const ir_node *node) {
return _is_irn_constlike(node);
}
/** the get_type operation must be always implemented */
static type *get_Null_type(ir_node *n) {
return NULL;
......
......@@ -987,13 +987,16 @@ ir_node *get_fragile_op_mem(ir_node *node);
/** Returns true if the operation is a forking control flow
* operation: Cond. */
int is_forking_op(const ir_node *node);
int is_irn_forking(const ir_node *node);
/** Return the type associated with the value produced by n
* if the node remarks this type as it is the case for
* Cast, Const, SymConst and some Proj nodes. */
type *get_irn_type(ir_node *n);
/** Returns non-zero for constant-like nodes. */
int is_irn_constlike(const ir_node *node);
/**
* Access custom node data.
* The data must have been registered with
......
......@@ -660,10 +660,18 @@ static INLINE cnst_classify_t _classify_Const(ir_node *node) {
return CNST_NO_CONST;
}
static INLINE int _is_irn_forking(const ir_node *node) {
return is_op_forking(_get_irn_op(node));
}
static INLINE type *_get_irn_type(ir_node *node) {
return _get_irn_op(node)->get_type(node);
}
static INLINE int _is_irn_constlike(const ir_node *node) {
return is_op_constlike(_get_irn_op(node));
}
/* this section MUST contain all inline functions */
#define is_ir_node(thing) _is_ir_node(thing)
#define get_irn_intra_arity(node) _get_irn_intra_arity(node)
......@@ -703,6 +711,8 @@ static INLINE type *_get_irn_type(ir_node *node) {
#define is_Block_dead(block) _is_Block_dead(block)
#define get_Const_tarval(node) _get_Const_tarval(node)
#define classify_Const(node) _classify_Const(node)
#define is_irn_forking(node) _is_irn_forking(node)
#define get_irn_type(node) _get_irn_type(node)
#define is_irn_constlike(node) _is_irn_constlike(node)
# endif /* _IRNODE_T_H_ */
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