is_irn_constlike() added
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 14 Sep 2005 11:08:14 +0000 (11:08 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 14 Sep 2005 11:08:14 +0000 (11:08 +0000)
renamed is_forking_op() to is_irn_forking()

[r6616]

ir/ir/irnode.c
ir/ir/irnode.h
ir/ir/irnode_t.h

index fe3421e..3047659 100644 (file)
@@ -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;
index fcb79fb..24573e1 100644 (file)
@@ -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
index 0a58755..842a3ea 100644 (file)
@@ -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_ */