/* Get the mode-enum modecode */
inline modecode get_irn_modecode (ir_node *node);
/* Get the ident for a string representation of the mode */
-inline ident *get_irn_modename (ir_node *node);
+inline ident *get_irn_modeident (ir_node *node);
/* Access the opcode struct of the node */
inline ir_op *get_irn_op (ir_node *node);
inline void set_irn_op (ir_node *node, ir_op *op);
/* Get the opcode-enum of the node */
inline opcode get_irn_opcode (ir_node *node);
/* Get the ident for a string representation of the opcode */
-inline ident *get_irn_opname (ir_node *node);
+inline const char *get_irn_opname (ir_node *node);
+inline ident *get_irn_opident (ir_node *node);
inline void set_irn_visited (ir_node *node, unsigned long visited);
inline unsigned long get_irn_visited (ir_node *node);
inline void set_irn_link (ir_node *node, ir_node *link);
inline void set_nodes_Block (ir_node *node, ir_node *block);
/* Projection numbers for result of Start node: use for Proj nodes! */
-enum {
+typedef enum {
pns_initial_exec, /* Projection on an executable, the initial control
flow. */
pns_global_store, /* Projection on the global store */
this flag. */
typedef enum {
type_tag, /* The SymConst is a type tag for the given type.
- Type_or_id_p is type * */
+ Type_or_id_p is type *. */
size, /* The SymConst is the size of the given type.
- Type_or_id_p is type * */
+ Type_or_id_p is type *. */
linkage_ptr_info /* The SymConst is a symbolic pointer to be filled in
- by the linker. Type_or_id_p is ident * */
+ by the linker. Type_or_id_p is ident *. */
} symconst_kind;
typedef union type_or_id * type_or_id_p;
inline symconst_kind get_SymConst_kind (ir_node *node);
inline void set_SymConst_kind (ir_node *node, symconst_kind num);
+/* Only to access SymConst of kind type_tag or size. Else assertion: */
inline type *get_SymConst_type (ir_node *node);
inline void set_SymConst_type (ir_node *node, type *type);
+/* Only to access SymConst of kind linkage_ptr_info. Else assertion: */
inline ident *get_SymConst_ptrinfo (ir_node *node);
inline void set_SymConst_ptrinfo (ir_node *node, ident *ptrinfo);
+/* Sets both: type and ptrinfo. Needed to treat the node independent of
+ its semantics. Does a memcpy for the memory tori points to. */
+inline type_or_id_p get_SymConst_type_or_id (ir_node *node);
+inline void set_SymConst_type_or_id (ir_node *node, type_or_id_p tori);
inline ir_node *get_Sel_mem (ir_node *node);
inline void set_Sel_mem (ir_node *node, ir_node *mem);
inline ir_node *get_Call_ptr (ir_node *node);
inline void set_Call_ptr (ir_node *node, ir_node *ptr);
inline ir_node **get_Call_param_arr (ir_node *node);
+inline int get_Call_n_params (ir_node *node);
inline int get_Call_arity (ir_node *node);
/* inline void set_Call_arity (ir_node *node, ir_node *arity); */
inline ir_node *get_Call_param (ir_node *node, int pos);
inline void set_Call_param (ir_node *node, int pos, ir_node *param);
-inline type_method *get_Call_type (ir_node *node);
-inline void set_Call_type (ir_node *node, type_method *type);
+inline type *get_Call_type (ir_node *node);
+inline void set_Call_type (ir_node *node, type *type);
/* For unary and binary arithmetic operations the access to the
operands can be factored out. Left is the first, right the
inline void set_Not_op (ir_node *node, ir_node *op);
/* Projection numbers of compare: use for Proj nodes! */
-enum {
+typedef enum {
False, /* false */
Eq, /* equal */
Lt, /* less */
#define DDMSG printf("%s(l.%i)\n", __FUNCTION__, __LINE__)
#define DDMSG1(X) printf("%s(l.%i) %s\n", __FUNCTION__, __LINE__, \
- id_to_str(get_irn_opname(X)))
+ id_to_str(get_irn_opident(X)))
#define DDMSG2(X) printf("%s(l.%i) %s: %ld\n", __FUNCTION__, __LINE__, \
- id_to_str(get_irn_opname(X)), get_irn_node_nr(X))
+ id_to_str(get_irn_opident(X)), get_irn_node_nr(X))
#define DDMSG3(X) printf("%s(l.%i) %s: %p\n", __FUNCTION__, __LINE__, \
print_firm_kind(X), (X))