X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Ffirm_types.h;h=fbf73f759877235ba9fa42bff03deb94955162d1;hb=4d64d1d8ea625cc6075a0086671c525a162726a0;hp=41cf757a4bcc31fc2aeb9e9a4af99b5adc6c4a6e;hpb=89777009806a0d70f83d1d4392a8778198648cfb;p=libfirm diff --git a/include/libfirm/firm_types.h b/include/libfirm/firm_types.h index 41cf757a4..fbf73f759 100644 --- a/include/libfirm/firm_types.h +++ b/include/libfirm/firm_types.h @@ -26,6 +26,8 @@ #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; @@ -70,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 * @@ -109,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 @@ -173,33 +172,6 @@ typedef union symconst_symbol { 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. */ @@ -231,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