+2011-04-11 Nathan Froyd <froydnj@codesourcery.com>
+
+ * tree.h (struct typed_tree): New.
+ (struct tree_common): Include it instead of tree_base.
+ (TREE_TYPE): Update for new location of type field.
+ (TYPE_USER_ALIGN, TYPE_PACKED): Refer to base field directly.
+ (DECL_USER_ALIGN, DECL_PACKED): Likewise.
+ (union tree_node): Add typed field.
+ * treestruct.def (TS_TYPED): New.
+ * lto-streamer.c (check_handled_ts_structures): Handle it.
+ * tree.c (MARK_TS_TYPED): New macro.
+ (MARK_TS_COMMON): Call it instead of MARK_TS_BASE.
+
2011-04-11 Eric Botcazou <ebotcazou@adacore.com>
* cfghooks.c (redirect_edge_and_branch_force): Localize variable.
unsigned address_space : 8;
};
-struct GTY(()) tree_common {
+struct GTY(()) tree_typed {
struct tree_base base;
- tree chain;
tree type;
};
+struct GTY(()) tree_common {
+ struct tree_typed typed;
+ tree chain;
+};
+
/* The following table lists the uses of each of the above flags and
for which types of nodes they are defined.
In VECTOR_TYPE nodes, this is the type of the elements. */
#define TREE_TYPE(NODE) __extension__ \
(*({__typeof (NODE) const __t = (NODE); \
- &__t->common.type; }))
+ &__t->typed.type; }))
extern void tree_contains_struct_check_failed (const_tree,
const enum tree_node_structure_enum,
#define OMP_CLAUSE_SUBCODE_CHECK(T, CODE) (T)
#define TREE_CHAIN(NODE) ((NODE)->common.chain)
-#define TREE_TYPE(NODE) ((NODE)->common.type)
+#define TREE_TYPE(NODE) ((NODE)->typed.type)
#endif
/* 1 if the alignment for this type was requested by "aligned" attribute,
0 if it is the default for this type. */
-#define TYPE_USER_ALIGN(NODE) (TYPE_CHECK (NODE)->common.base.user_align)
+#define TYPE_USER_ALIGN(NODE) (TYPE_CHECK (NODE)->base.user_align)
/* The alignment for NODE, in bytes. */
#define TYPE_ALIGN_UNIT(NODE) (TYPE_ALIGN (NODE) / BITS_PER_UNIT)
/* Indicated that objects of this type should be laid out in as
compact a way as possible. */
-#define TYPE_PACKED(NODE) (TYPE_CHECK (NODE)->common.base.packed_flag)
+#define TYPE_PACKED(NODE) (TYPE_CHECK (NODE)->base.packed_flag)
/* Used by type_contains_placeholder_p to avoid recomputation.
Values are: 0 (unknown), 1 (false), 2 (true). Never access
/* Set if the alignment of this DECL has been set by the user, for
example with an 'aligned' attribute. */
#define DECL_USER_ALIGN(NODE) \
- (DECL_COMMON_CHECK (NODE)->common.base.user_align)
+ (DECL_COMMON_CHECK (NODE)->base.user_align)
/* Holds the machine mode corresponding to the declaration of a variable or
field. Always equal to TYPE_MODE (TREE_TYPE (decl)) except for a
FIELD_DECL. */
#define DECL_FCONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->field_decl.fcontext)
/* In a FIELD_DECL, indicates this field should be bit-packed. */
-#define DECL_PACKED(NODE) (FIELD_DECL_CHECK (NODE)->common.base.packed_flag)
+#define DECL_PACKED(NODE) (FIELD_DECL_CHECK (NODE)->base.packed_flag)
/* Nonzero in a FIELD_DECL means it is a bit field, and must be accessed
specially. */
union GTY ((ptr_alias (union lang_tree_node),
desc ("tree_node_structure (&%h)"), variable_size)) tree_node {
struct tree_base GTY ((tag ("TS_BASE"))) base;
+ struct tree_typed GTY ((tag ("TS_TYPED"))) typed;
struct tree_common GTY ((tag ("TS_COMMON"))) common;
struct tree_int_cst GTY ((tag ("TS_INT_CST"))) int_cst;
struct tree_real_cst GTY ((tag ("TS_REAL_CST"))) real_cst;