-
-/* projection numbers of compare. */
-enum {
- False, /* false */
- Eq, /* equal */
- Lt, /* less */
- Le, /* less or equal */
- Gt, /* greater */
- Ge, /* greater or equal */
- Lg, /* less or greater */
- Leg, /* less, equal or greater = ordered */
- Uo, /* unordered */
- Ue, /* unordered or equal */
- Ul, /* unordered or less */
- Ule, /* unordered, less or equal */
- Ug, /* unordered or greater */
- Uge, /* unordered, greater or equal */
- Ne, /* unordered, less or greater = not equal */
- True, /* true */
- not_mask = Leg /* bits to flip to negate comparison */
-} pnc_number;
-
-inline char *
-get_pnc_string(int pnc);
-
-int
-get_negated_pnc(int pnc);
-
-
-/* projection numbers for result of Start node. */
-enum {
- pns_initial_exec, /* Projection on an executable, the initial control
- flow. */
- pns_global_store, /* Projection on the global store */
- pns_frame_base, /* Projection on the frame base */
- pns_globals, /* Projection on the pointer to the data segment
- containing _all_ global entities. */
- pns_args /* Projection on all arguments */
-} pns_number;
-
-/* ir node attributes */
-typedef struct {
- unsigned long block_visit; /* 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 */
-} block_attr;
-
-typedef enum {
- type_tag, /* The SymConst is a type tag for the given type. */
- size, /* The SymConst is the size of the given type. */
- linkage_ptr_info /* The SymConst is a symbolic pointer to be filled in
- by the linker. */
-} symconst_kind;
-
-typedef union {
- type *typ;
- ident *ptrinfo;
-} type_or_id;
-
-typedef struct {
- type_or_id tori;
- symconst_kind num;
-} symconst_attr;
-
-typedef enum {
- static_linkage, /* entity is used internal and not visible out of this
- file/class. */
- external_linkage, /* */
- no_linkage
-} linkage_type;
-
-typedef struct {
- entity *ent; /* entity to select */
- linkage_type *ltyp; /* linkage type of the entity */
-} sel_attr;
-
-typedef enum {
- stack_alloc, /* Alloc allocates the object on the stack. */
- heap_alloc /* lloc allocates the object on the heap. */
-} where_alloc;
-
-typedef struct {
- type *type; /* Type of the allocated object. */
- where_alloc where; /* stack, heap or other managed part of memory */
-} alloc_attr;
-
-/* Some irnodes just have one attribute, these are stored here,
- some have more. Their name is 'irnodename_attr' */
-typedef union {
- block_attr block; /* For Block: Fields needed to construct it */
- struct tarval *con; /* For Const: contains the value of the constant */
- symconst_attr i; /* For SymConst. */
- sel_attr s; /* For Sel. */
- type_method *call; /* For Call: pointer to the type of the method to call */
- long proj; /* For Proj: contains the result position to project */
- alloc_attr a; /* For Alloc. */
- type *f; /* For Free. */
- int phi0_pos; /* For Phi. Used to remember the value defined by
- this Phi node. Needed when the Phi is completed
- to call get_r_internal_value to find the
- predecessors. If this attribute is set, the Phi
- node takes the role of the obsolete Phi0 node,
- therefore the name. */
-} attr;
-
-
-/* common structure of an irnode */
-/* if the node has some attributes, they are stored in attr */
-
-struct ir_node {
- firm_kind kind; /* distinguishes this node from others */
- ir_op *op; /* Opcode of this node. */
- ir_mode *mode; /* Mode of this node. */
- unsigned long visit; /* visited counter for walks of the graph */
- struct ir_node **in; /* array with predecessors / operands */
- struct ir_node *link; /* for linking nodes somehow to a list, e.g.
- used while construction to link Phi0 nodes and
- during optimization to link to nodes that
- shall replace a node. */
- attr attr; /* attribute of this node. Depends on opcode. */
- /* Must be last attribute of struct ir_node. */
-} ;
-