X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firnode.h;h=983f71f49fba687db105bbfa346bf34845998c56;hb=f9d25133f86594ca2b1f33fb0b41a591ecc9b914;hp=9349366c641bf1223faa5f5ef6b97e48170b8a12;hpb=a8aa62cfa565dcb787b239ad55f8c89cc519de5f;p=libfirm diff --git a/ir/ir/irnode.h b/ir/ir/irnode.h index 9349366c6..983f71f49 100644 --- a/ir/ir/irnode.h +++ b/ir/ir/irnode.h @@ -445,8 +445,9 @@ typedef enum { Type_or_id_p is entity *. */ } symconst_kind; -/** SymConst attributes - This union contains the symbolic information represented by the node */ +/** SymConst attribute. + * + * This union contains the symbolic information represented by the node. */ union symconst_symbol { type *type_p; ident *ident_p; @@ -651,7 +652,8 @@ void set_Div_mem (ir_node *node, ir_node *mem); typedef enum { pn_Div_M, /**< Memory result. */ pn_Div_X_except, /**< Execution result if exception occurred. */ - pn_Div_res /**< Result of computation. */ + pn_Div_res, /**< Result of computation. */ + pn_Div_max /**< number of projections from a Div */ } pn_Div; /* Projection numbers for Div. */ ir_node *get_Mod_left (ir_node *node); @@ -935,6 +937,26 @@ void set_Mux_false (ir_node *node, ir_node *ir_false); ir_node *get_Mux_true (ir_node *node); void set_Mux_true (ir_node *node, ir_node *ir_true); +/** + * Projection numbers for result of CopyB node: use for Proj nodes! + */ +typedef enum { + pn_CopyB_M_regular = pn_Call_M_regular, /**< The memory result. */ + pn_CopyB_X_except = pn_Call_X_except, /**< The control flow result branching to the exception handler */ + pn_CopyB_M_except = pn_Call_M_except, /**< The memory result in case the runtime function terminated with + an exception */ + pn_CopyB_max = pn_Call_max /**< number of projections from a CopyB */ +} pn_CopyB; /* Projection numbers for CopyB. */ +#define pn_CopyB_M pn_CopyB_M_regular + +ir_node *get_CopyB_mem (ir_node *node); +void set_CopyB_mem (ir_node *node, ir_node *mem); +ir_node *get_CopyB_dst (ir_node *node); +void set_CopyB_dst (ir_node *node, ir_node *dst); +ir_node *get_CopyB_src (ir_node *node); +void set_CopyB_src (ir_node *node, ir_node *src); +type *get_CopyB_type(ir_node *node); +void set_CopyB_type(ir_node *node, type *data_type); /* * @@ -986,13 +1008,34 @@ ir_node *get_fragile_op_mem(ir_node *node); /** Returns true if the operation is a forking control flow * operation: Cond. */ -int is_forking_op(const ir_node *node); +int is_irn_forking(const ir_node *node); /** Return the type associated with the value produced by n * if the node remarks this type as it is the case for * Cast, Const, SymConst and some Proj nodes. */ type *get_irn_type(ir_node *n); +/** Returns non-zero for constant-like nodes. */ +int is_irn_constlike(const ir_node *node); + +/** + * A type to express conditional jump predictions. + */ +typedef enum { + COND_JMP_PRED_NONE, /**< No jump prediction. Default. */ + COND_JMP_PRED_TRUE, /**< The True case is predicted. */ + COND_JMP_PRED_FALSE /**< The False case is predicted. */ +} cond_jmp_predicate; + +/** Gets the string representation of the jump prediction .*/ +const char *get_cond_jmp_predicate_name(cond_jmp_predicate pred); + +/** Returns the conditional jump prediction of a Cond node. */ +cond_jmp_predicate get_Cond_jmp_pred(ir_node *cond); + +/** Sets a new conditional jump prediction. */ +void set_Cond_jmp_pred(ir_node *cond, cond_jmp_predicate pred); + /** * Access custom node data. * The data must have been registered with @@ -1023,6 +1066,11 @@ type *get_irn_type(ir_node *n); */ unsigned register_additional_node_data(unsigned size); +/** + * Return a pointer to the node attributes. + * Needed for user-defined nodes. + */ +void *get_irn_generic_attr(ir_node *node); /*-----------------------------------------------------------------*/ /** Debug aides **/