X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Ffirm_types.h;h=fbf73f759877235ba9fa42bff03deb94955162d1;hb=4d64d1d8ea625cc6075a0086671c525a162726a0;hp=f81485aa2fec3c68b483115fc23d318aba5ab19d;hpb=d59632bf0674cdc39986c92ebb882a92be68193a;p=libfirm diff --git a/include/libfirm/firm_types.h b/include/libfirm/firm_types.h index f81485aa2..fbf73f759 100644 --- a/include/libfirm/firm_types.h +++ b/include/libfirm/firm_types.h @@ -26,12 +26,14 @@ #ifndef FIRM_COMMON_FIRM_TYPES_H #define FIRM_COMMON_FIRM_TYPES_H +#include "begin.h" + typedef unsigned long ir_visited_t; typedef unsigned long ir_exc_region_t; typedef unsigned long ir_label_t; typedef struct dbg_info dbg_info, *dbg_info_ptr; -typedef struct type_dbg_info type_dbg_info; +typedef struct type_dbg_info type_dbg_info, *type_dbg_info_ptr; typedef const struct _ident ident, *ir_ident_ptr; typedef struct ir_node ir_node, *ir_node_ptr; typedef struct ir_op ir_op, *ir_op_ptr; @@ -46,7 +48,6 @@ typedef struct ir_loop ir_loop, *ir_loop_ptr; typedef struct ir_region ir_region, *ir_region_ptr; typedef struct ir_reg_tree ir_reg_tree, *ir_reg_tree_ptr; typedef struct ir_entity ir_entity, *ir_entity_ptr; -typedef struct _ir_phase ir_phase, *ir_phase_ptr; typedef struct _ir_extblk ir_extblk, *ir_extblk_ptr; typedef struct ir_exec_freq ir_exec_freq, *ir_exec_freq_ptr; typedef struct ir_cdep ir_cdep, *ir_cdep_ptr; @@ -71,18 +72,6 @@ typedef struct ir_settings_if_conv_t ir_settings_if_conv_t; /* states */ -/** The state of the interprocedural view. - * - * This value indicates the state of the interprocedural view. - */ -typedef enum { - ip_view_no, /**< The interprocedural view is not constructed. There are no - view specific nodes (EndReg, Filter, Break ...) in any graph. */ - ip_view_valid, /**< The interprocedural view is valid. */ - ip_view_invalid /**< The interprocedural view is invalid. Specific nodes are - all still in the representation, but the graph is no more complete. */ -} ip_view_state; - /** * This function is called, whenever a local variable is used before definition * @@ -110,6 +99,15 @@ typedef enum { exception or uses memory, else can float. Used internally. */ } op_pin_state; +/** + * 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; + /** * Additional method type properties: * Tell about special properties of a method type. Some @@ -146,8 +144,8 @@ typedef enum { } mtp_additional_property; /** This enum names the different kinds of symbolic Constants represented by - * SymConst. The content of the attribute type_or_id depends on this tag. Use - * the proper access routine after testing this flag. */ + * SymConst. The content of the attribute symconst_symbol depends on this tag. + * Use the proper access routine after testing this flag. */ typedef enum symconst_kind { symconst_type_tag, /**< The SymConst is a type tag for the given type. symconst_symbol is type *. */ @@ -155,9 +153,6 @@ typedef enum symconst_kind { symconst_symbol is type *. */ symconst_type_align, /**< The SymConst is the alignment of the given type. symconst_symbol is type *. */ - symconst_addr_name, /**< The SymConst is a symbolic pointer to be filled in - by the linker. The pointer is represented by a string. - symconst_symbol is ident *. */ symconst_addr_ent, /**< The SymConst is a symbolic pointer to be filled in by the linker. The pointer is represented by an entity. symconst_symbol is entity *. */ @@ -173,38 +168,10 @@ typedef enum symconst_kind { */ typedef union symconst_symbol { ir_type *type_p; /**< The type of a SymConst. */ - ident *ident_p; /**< The ident of a SymConst. */ ir_entity *entity_p; /**< The entity of a SymConst. */ ir_enum_const *enum_p; /**< The enumeration constant of a SymConst. */ } symconst_symbol; -/** - * Projection numbers for Cmp are defined several times. - * The bit patterns are used for various tests, so don't change. - * The "unordered" values are possible results of comparing - * floating point numbers. - * Note that the encoding is imported, so do NOT change the order. - */ -typedef enum { - pn_Cmp_False = 0, /**< false */ - pn_Cmp_Eq = 1, /**< equal */ - pn_Cmp_Lt = 2, /**< less */ - pn_Cmp_Le = pn_Cmp_Eq|pn_Cmp_Lt, /**< less or equal */ - pn_Cmp_Gt = 4, /**< greater */ - pn_Cmp_Ge = pn_Cmp_Eq|pn_Cmp_Gt, /**< greater or equal */ - pn_Cmp_Lg = pn_Cmp_Lt|pn_Cmp_Gt, /**< less or greater */ - pn_Cmp_Leg = pn_Cmp_Lt|pn_Cmp_Eq|pn_Cmp_Gt, /**< less, equal or greater = ordered */ - pn_Cmp_Uo = 8, /**< unordered */ - pn_Cmp_Ue = pn_Cmp_Uo|pn_Cmp_Eq, /**< unordered or equal */ - pn_Cmp_Ul = pn_Cmp_Uo|pn_Cmp_Lt, /**< unordered or less */ - pn_Cmp_Ule = pn_Cmp_Uo|pn_Cmp_Eq|pn_Cmp_Lt, /**< unordered, less or equal */ - pn_Cmp_Ug = pn_Cmp_Uo|pn_Cmp_Gt, /**< unordered or greater */ - pn_Cmp_Uge = pn_Cmp_Uo|pn_Cmp_Eq|pn_Cmp_Gt, /**< unordered, greater or equal */ - pn_Cmp_Ne = pn_Cmp_Uo|pn_Cmp_Lt|pn_Cmp_Gt, /**< unordered, less or greater = not equal */ - pn_Cmp_True = 15 /**< true */ - /* not_mask = Leg*/ /* bits to flip to negate comparison * @@ hack for JNI interface */ -} pn_Cmp; /* Projection numbers for Cmp */ - /** The allocation place. */ typedef enum { stack_alloc, /**< Alloc allocates the object on the stack. */ @@ -236,4 +203,16 @@ typedef enum { ir_bk_inner_trampoline, /**< address of a trampoline for GCC inner functions */ } ir_builtin_kind; +/** + * Some projection numbers must be always equal to support automatic phi construction + */ +enum pn_generic { + pn_Generic_M = 0, /**< The memory result. */ + pn_Generic_X_regular = 1, /**< Execution result if no exception occurred. */ + pn_Generic_X_except = 2, /**< The control flow result branching to the exception handler */ + pn_Generic_other = 3 /**< First free projection number */ +}; + +#include "end.h" + #endif