-/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
+/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe 3 2002/02/28 13:33:52
** All rights reserved.
**
** Authors: Martin Trapp, Christian Schaefer
# include "irmode.h"
# include "tv.h"
# include "type.h"
+# include "dbginfo.h"
+# include "exc.h"
/* The typedefiniton of ir_node is also in irgraph.h to resolve
recursion between irnode.h and irgraph.h */
inline unsigned long get_irn_visited (ir_node *node);
/* Sets visited to get_irg_visited(current_ir_graph) */
inline void mark_irn_visited (ir_node *node);
+/* Returns 1 of visited < get_irg_visited(current_ir_graph). */
+inline int irn_not_visited (ir_node *node);
inline void set_irn_link (ir_node *node, ir_node *link);
inline ir_node *get_irn_link (ir_node *node);
-#ifdef DEBUG_libfirm
-/* Outputs a unique number for this node */
+/* Outputs a unique number for this node if libfirm is compiled for
+ debugging, else returns 0. */
inline long get_irn_node_nr(ir_node *node);
-#endif
/*****/
/* irnode constructor */
/* If arity is negative, a node with a dynamic array is created. */
inline ir_node *
-new_ir_node (ir_graph *irg,
+new_ir_node (dbg_info *db,
+ ir_graph *irg,
ir_node *block,
ir_op *op,
ir_mode *mode,
inline void set_Block_matured (ir_node *node, bool matured);
inline unsigned long get_Block_block_visited (ir_node *node);
inline void set_Block_block_visited (ir_node *node, unsigned long visit);
+/* For this current_ir_graph must be set. */
+inline void mark_Block_block_visited(ir_node *node);
+inline int Block_not_block_visited(ir_node *node);
inline ir_node *get_Block_graph_arr (ir_node *node, int pos);
inline void set_Block_graph_arr (ir_node *node, int pos, ir_node *value);
+void set_Block_exc (ir_node*, exc_t);
+exc_t get_Block_exc (ir_node*);
+
+/* Set and remove interprocedural predecessors. If the interprocedural
+ * predecessors are removed, the node has the same predecessors in
+ * both views. */
+void set_Block_cg_cfgpred_arr(ir_node * node, int arity, ir_node ** in);
+void set_Block_cg_cfgpred(ir_node * node, int pos, ir_node * pred);
+ir_node ** get_Block_cg_cfgpred_arr(ir_node * node);
+int get_Block_cg_n_cfgpreds(ir_node * node);
+void remove_Block_cg_cfgpred_arr(ir_node * node);
+
inline int get_End_n_keepalives(ir_node *end);
inline ir_node *get_End_keepalive(ir_node *end, int pos);
inline void add_End_keepalive (ir_node *end, ir_node *ka);
+inline ir_node *set_End_keepalive(ir_node *end, int pos, ir_node *ka);
/* Some parts of the End node are allocated seperately -- their memory
is not recovered by dead_node_elimination if a End node is dead.
free_End frees these data structures. */
inline type *get_Call_type (ir_node *node);
inline void set_Call_type (ir_node *node, type *type);
+/* Set, get and remove the callee-analysis. */
+int get_Call_n_callees(ir_node * node);
+entity * get_Call_callee(ir_node * node, int pos);
+void set_Call_callee_arr(ir_node * node, int n, entity ** arr);
+void remove_Call_callee_arr(ir_node * node);
+
/* For unary and binary arithmetic operations the access to the
operands can be factored out. Left is the first, right the
second arithmetic value as listed in tech report 1999-44.
inline ir_node *get_Id_pred (ir_node *node);
inline void set_Id_pred (ir_node *node, ir_node *pred);
+inline ir_node *get_Filter_pred(ir_node *node);
+inline long get_Filter_proj(ir_node *node);
+/* set the interprocedural predecessors */
+void set_Filter_cg_pred_arr(ir_node * node, int arity, ir_node ** in);
+void set_Filter_cg_pred(ir_node * node, int pos, ir_node * pred);
+
+/* Returns the ir_graph this node belongs to. Only valid for
+ * CallBegin, EndReg and EndExcept */
+inline ir_graph *get_irn_irg(ir_node *node);
+
/*****/
/****s* irnode/other2
inline int is_Bad (ir_node *node);
/* returns true if the node is not a Block */
inline int is_no_Block (ir_node *node);
+/* returns true if node is a Proj node or a Filter node in
+ * intraprocedural view */
+inline int is_Proj (ir_node *node);
/* Returns true if the operation manipulates control flow:
Start, End, Jmp, Cond, Return, Raise, Bad */
int is_cfop(ir_node *node);
/*****/
/* Makros for debugging the libfirm */
-/*#ifdef DEBUG_libfirm*/
#include "ident.h"
#define DDMSG printf("%s(l.%i)\n", __FUNCTION__, __LINE__)
#define DDME(X) xprintf("%s(l.%i) %I: %p\n", __FUNCTION__, __LINE__, \
get_entity_ident(X), (X))
-/*#endif*/
# endif /* _IRNODE_H_ */