X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firnode.h;h=353de848ab5b2a7cd94b079e27e2a05d8d2e98c1;hb=5f8ddee6b08c8040c0a304a347d65045c1141d52;hp=f5c112f79d252202516c9db90af2259a47aaa000;hpb=c133b9328891403004aabc67e05f1541e286e98b;p=libfirm diff --git a/ir/ir/irnode.h b/ir/ir/irnode.h index f5c112f79..353de848a 100644 --- a/ir/ir/irnode.h +++ b/ir/ir/irnode.h @@ -58,14 +58,15 @@ inline ir_mode *get_irn_mode (ir_node *node); /* 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); @@ -82,7 +83,7 @@ inline ir_node *get_nodes_Block (ir_node *node); 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 */ @@ -129,19 +130,25 @@ inline void set_Const_tarval (ir_node *node, tarval *con); 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); @@ -168,6 +175,7 @@ inline void set_Call_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); @@ -258,7 +266,7 @@ inline ir_node *get_Not_op (ir_node *node); 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 */ @@ -396,9 +404,9 @@ int is_fragile_op(ir_node *node); #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))