}
/* 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;
/** 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
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)
#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_ */