Remove unnecessary conversions to wider modes as operands of Cmp.
[libfirm] / ir / tr / type_t.h
index be7efed..59a0d91 100644 (file)
@@ -115,9 +115,10 @@ typedef struct {
        ir_type *points_to;  /**< The type of the ir_entity the pointer points to. */
 } ptr_attr;
 
-/*
-typedef struct {   * No private attr yet! *
-} pri_attr; */
+/** Primitive type attributes. */
+typedef struct {
+       ir_type *base_type;  /**< For bitfield types: The base primitive type, NULL else. */
+} pri_attr;
 
 
 /*
@@ -134,6 +135,7 @@ typedef union {
        arr_attr aa;      /**< Attributes of an array type */
        enm_attr ea;      /**< Attributes of an enumeration type */
        ptr_attr pa;      /**< Attributes of a pointer type */
+       pri_attr ba;      /**< Attributes of a primitive bitfield type */
 } tp_attr;
 
 /** Additional type flags. */
@@ -405,6 +407,16 @@ _type_not_visited(const ir_type *tp) {
        return tp->visit  < firm_type_visited;
 }
 
+static INLINE dbg_info *
+_get_type_dbg_info(const ir_type *tp) {
+       return tp->dbi;
+}
+
+static INLINE void
+_set_type_dbg_info(ir_type *tp, dbg_info *db) {
+       tp->dbi = db;
+}
+
 static INLINE int
 _is_type(const void *thing) {
        return (get_kind(thing) == k_type);
@@ -584,6 +596,7 @@ _set_method_calling_convention(ir_type *method, unsigned cc_mask) {
        method->attr.ma.irg_calling_conv = cc_mask;
 }
 
+
 #define set_master_type_visited(val)      _set_master_type_visited(val)
 #define get_master_type_visited()         _get_master_type_visited()
 #define inc_master_type_visited()         _inc_master_type_visited()
@@ -603,6 +616,8 @@ _set_method_calling_convention(ir_type *method, unsigned cc_mask) {
 #define mark_type_visited(tp)             _mark_type_visited(tp)
 #define type_visited(tp)                  _type_visited(tp)
 #define type_not_visited(tp)              _type_not_visited(tp)
+#define get_type_dbg_info(tp)             _get_type_dbg_info(tp)
+#define set_type_dbg_info(tp, db)         _set_type_dbg_info(tp, db)
 #define is_type(thing)                    _is_type(thing)
 #define is_Class_type(clss)               _is_class_type(clss)
 #define get_class_n_members(clss)         _get_class_n_members(clss)