# include "firm_common_t.h"
# include "irdom_t.h" /* For size of struct dom_info. */
# include "dbginfo.h"
+# include "irloop.h"
# include "exc.h"
/** Block attributes */
typedef struct {
+ /* General attributes */
+ ir_graph *irg;
unsigned long block_visited; /**< for the walker that walks over all blocks. */
/* Attributes private to construction: */
bool matured; /**< if set, all in-nodes of the block are fixed */
struct ir_node **graph_arr; /**< array to store all parameters */
+ /* Attributes holding analyses information */
struct dom_info dom; /**< Datastructure that holds information about dominators.
- @todo
- Eventually overlay with graph_arr as only valid
- in different phases. Eventually inline the whole
- datastructure. */
- exc_t exc; /**< role of this block for exception handling */
- ir_node *handler_entry; /**< handler entry block iff this block is part of a region */
+ @@@ @todo
+ Eventually overlay with graph_arr as only valid
+ in different phases. Eventually inline the whole
+ datastructure. */
+ // exc_t exc; /**< role of this block for exception handling */
+ // ir_node *handler_entry; /**< handler entry block iff this block is part of a region */
ir_node ** in_cg; /**< array with predecessors in
* interprocedural_view, if they differ
* from intraprocedural predecessors */
int *backedge; /**< Field n set to true if pred n is backedge.
- @todo Ev. replace by bitfield! */
+ @@@ @todo Ev. replace by bitfield! */
int *cg_backedge; /**< Field n set to true if pred n is interprocedural backedge.
- @todo Ev. replace by bitfield! */
+ @@@ @todo Ev. replace by bitfield! */
} block_attr;
/** Start attributes */
typedef struct {
- ir_graph *irg;
+ char dummy;
+ // ir_graph *irg; @@@ now in block
} start_attr;
/** Cond attributes */
/** EndReg/EndExcept attributes */
typedef struct {
- ir_graph * irg; /**< ir_graph this node belongs to (for
- * navigating in interprocedural graphs) */
+ char dummy;
+ // ir_graph * irg; /**< ir_graph this node belongs to (for
+ // * navigating in interprocedural graphs)
+ // @@@ now in block */
} end_attr;
/** CallBegin attributes */
typedef struct {
- ir_graph * irg; /**< ir_graph this node belongs to (for
- * navigating in interprocedural graphs) */
+ // ir_graph * irg; / **< ir_graph this node belongs to (for
+ // * navigating in interprocedural graphs) */
+ // @@@ now in block
ir_node * call; /**< associated Call-operation */
} callbegin_attr;
int node_nr; /**< a unique node number for each node to make output
readable. */
#endif
+ /* ------- For analyses -------- */
+ ir_loop *loop; /**< the loop the node is in. Access routines in irloop.h */
+ /* ------- Opcode depending fields -------- */
attr attr; /**< attribute of this node. Depends on opcode.
Must be last field of struct ir_node. */
};
/** Copies all attributes stored in the old node to the new node.
Assumes both have the same opcode and sufficient size. */
void
-copy_attrs (ir_node *old, ir_node *new);
+copy_attrs(const ir_node *old_node, ir_node *new_node);
/** Returns the array with the ins. The content of the array may not be
INLINE type *get_irn_free_attr (ir_node *node);
INLINE symconst_attr get_irn_symconst_attr (ir_node *node);
type *get_irn_call_attr (ir_node *node);
+type *get_irn_funccall_attr (ir_node *node);
sel_attr get_irn_sel_attr (ir_node *node);
int get_irn_phi_attr (ir_node *node);
block_attr get_irn_block_attr (ir_node *node);