/*
- * Project: libFIRM
- * File name: ir/ir/irnode_t.h
- * Purpose: Representation of an intermediate operation -- private header.
- * Author: Martin Trapp, Christian Schaefer
- * Modified by: Goetz Lindenmaier, Michael Beck
- * Created:
- * CVS-ID: $Id$
- * Copyright: (c) 1998-2003 Universität Karlsruhe
- * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
*/
/**
- * @file irnode_t.h
- *
- * Declarations of an ir node.
- *
- * @author Martin Trapp, Christian Schaefer
+ * @file
+ * @brief Representation of an intermediate operation -- private header.
+ * @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck
+ * @version $Id$
*/
-#ifndef _FIRM_IRNODE_T_H_
-#define _FIRM_IRNODE_T_H_
+#ifndef FIRM_IR_IRNODE_T_H
+#define FIRM_IR_IRNODE_T_H
#include "firm_config.h"
#include "irnode.h"
return (_get_irn_op(node) == op_Quot);
}
+static INLINE int
+_is_Add(const ir_node *node) {
+ assert(node);
+ return (_get_irn_op(node) == op_Add);
+}
+
+static INLINE int
+_is_Sub(const ir_node *node) {
+ assert(node);
+ return (_get_irn_op(node) == op_Sub);
+}
+
static INLINE int
_is_Start(const ir_node *node) {
assert(node);
return (_get_irn_op(node) == op_Const);
}
+static INLINE int
+_is_Conv(const ir_node *node) {
+ assert(node);
+ return (_get_irn_op(node) == op_Conv);
+}
+
static INLINE int
_is_CopyB(const ir_node *node) {
assert(node);
return (_get_irn_op(node) == op_Sel);
}
+static INLINE int
+_is_Mul(const ir_node *node) {
+ assert(node);
+ return (_get_irn_op(node) == op_Mul);
+}
+
static INLINE int
_is_Mux(const ir_node *node) {
assert(node);
return _get_irn_arity(node) >> 1;
}
+static INLINE void *_get_irn_generic_attr(ir_node *node) {
+ return &node->attr;
+}
+
+static INLINE const void *_get_irn_generic_attr_const(const ir_node *node) {
+ return &node->attr;
+}
+
static INLINE unsigned _get_irn_idx(const ir_node *node) {
return node->node_idx;
}
#define is_unop(node) _is_unop(node)
#define is_binop(node) _is_binop(node)
#define is_Const(node) _is_Const(node)
+#define is_Conv(node) _is_Conv(node)
#define is_Unknown(node) _is_Unknown(node)
#define is_Return(node) _is_Return(node)
#define is_Call(node) _is_Call(node)
#define is_Sel(node) _is_Sel(node)
+#define is_Mul(node) _is_Mul(node)
#define is_Mux(node) _is_Mux(node)
#define is_Load(node) _is_Load(node)
#define is_Sync(node) _is_Sync(node)
#define is_Div(node) _is_Div(node)
#define is_DivMod(node) _is_DivMod(node)
#define is_Quot(node) _is_Quot(node)
+#define is_Add(node) _is_Add(node)
+#define is_Sub(node) _is_Sub(node)
#define is_no_Block(node) _is_no_Block(node)
#define is_Block(node) _is_Block(node)
#define get_Block_n_cfgpreds(node) _get_Block_n_cfgpreds(node)
#define get_Cond_jmp_pred(node) _get_Cond_jmp_pred(node)
#define set_Cond_jmp_pred(node, pred) _set_Cond_jmp_pred(node, pred)
#define get_Psi_n_conds(node) _get_Psi_n_conds(node)
+#define get_irn_generic_attr(node) _get_irn_generic_attr(node)
+#define get_irn_generic_attr_const(node) _get_irn_generic_attr_const(node)
#define get_irn_idx(node) _get_irn_idx(node)
#define get_irn_deps(node) _get_irn_deps(node)
#define get_irn_ins_or_deps(node) _get_irn_ins_or_deps(node)
#define get_irn_in_or_dep(node, pos) _get_irn_in_or_dep(node, pos)
-#endif /* _FIRM_IRNODE_T_H_ */
+#endif