See the accessor macros, defined below, for documentation of the
fields. */
-struct tree_common
+struct tree_common GTY(())
{
tree chain;
tree type;
construct the address of this field. This is used for aliasing
purposes: see record_component_aliases.
In CONSTRUCTOR nodes, it means object constructed must be in memory.
- In LABEL_DECL nodes, it means a goto for this label has been seen
+ In LABEL_DECL nodes, it means a goto for this label has been seen
from a place outside all binding contours that restore stack levels.
In ..._TYPE nodes, it means that objects of this type must
be fully addressable. This means that pieces of this
#define TREE_BOUNDED(NODE) ((NODE)->common.bounded_flag)
-/* Nonzero in a IDENTIFIER_NODE if the use of the name is defined as a
+/* Nonzero in an IDENTIFIER_NODE if the use of the name is defined as a
deprecated feature by __attribute__((deprecated)). */
#define TREE_DEPRECATED(NODE) ((NODE)->common.deprecated_flag)
(((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \
< (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \
|| (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \
- == (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \
+ == (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \
&& TREE_INT_CST_LOW (A) < TREE_INT_CST_LOW (B)))
-struct tree_int_cst
+struct tree_int_cst GTY(())
{
struct tree_common common;
rtx rtl; /* acts as link to register transfer language
/* A sub-struct is necessary here because the function `const_hash'
wants to scan both words as a unit and taking the address of the
sub-struct yields the properly inclusive bounded pointer. */
- struct {
+ struct tree_int_cst_lowhi {
unsigned HOST_WIDE_INT low;
HOST_WIDE_INT high;
} int_cst;
#define TREE_CST_RTL(NODE) (CST_OR_CONSTRUCTOR_CHECK (NODE)->real_cst.rtl)
-/* In a REAL_CST node.
+/* In a REAL_CST node. struct realvaluetype is an opaque entity, with
+ manipulators defined in real.h. We don't want tree.h depending on
+ real.h and transitively on tm.h. */
+struct realvaluetype;
- We can represent a real value as either a `double' or an array of
- longs. */
+#define TREE_REAL_CST_PTR(NODE) (REAL_CST_CHECK (NODE)->real_cst.real_cst_ptr)
+#define TREE_REAL_CST(NODE) (*TREE_REAL_CST_PTR (NODE))
-#define TREE_REAL_CST(NODE) (REAL_CST_CHECK (NODE)->real_cst.real_cst)
-
-#include "real.h"
-
-struct tree_real_cst
+struct tree_real_cst GTY(())
{
struct tree_common common;
rtx rtl; /* acts as link to register transfer language (rtl) info */
- REAL_VALUE_TYPE real_cst;
+ struct realvaluetype * real_cst_ptr;
};
/* In a STRING_CST */
#define TREE_STRING_LENGTH(NODE) (STRING_CST_CHECK (NODE)->string.length)
#define TREE_STRING_POINTER(NODE) (STRING_CST_CHECK (NODE)->string.pointer)
-struct tree_string
+struct tree_string GTY(())
{
struct tree_common common;
rtx rtl; /* acts as link to register transfer language (rtl) info */
#define TREE_REALPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.real)
#define TREE_IMAGPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.imag)
-struct tree_complex
+struct tree_complex GTY(())
{
struct tree_common common;
rtx rtl; /* acts as link to register transfer language (rtl) info */
/* In a VECTOR_CST node. */
#define TREE_VECTOR_CST_ELTS(NODE) (VECTOR_CST_CHECK (NODE)->vector.elements)
-struct tree_vector
+struct tree_vector GTY(())
{
struct tree_common common;
rtx rtl;
((tree) ((char *) (NODE) - sizeof (struct tree_common)))
#define GCC_IDENT_TO_HT_IDENT(NODE) (&((struct tree_identifier *) (NODE))->id)
-struct tree_identifier
+struct tree_identifier GTY(())
{
struct tree_common common;
struct ht_identifier id;
#define TREE_PURPOSE(NODE) (TREE_LIST_CHECK (NODE)->list.purpose)
#define TREE_VALUE(NODE) (TREE_LIST_CHECK (NODE)->list.value)
-struct tree_list
+struct tree_list GTY(())
{
struct tree_common common;
tree purpose;
#define TREE_VEC_END(NODE) \
((void) TREE_VEC_CHECK (NODE), &((NODE)->vec.a[(NODE)->vec.length]))
-struct tree_vec
+struct tree_vec GTY(())
{
struct tree_common common;
int length;
- tree a[1];
+ tree GTY ((length ("TREE_VEC_LENGTH ((tree)&%h)"))) a[1];
};
/* Define fields and accessors for some nodes that represent expressions. */
#define LABELED_BLOCK_BODY(NODE) \
TREE_OPERAND (LABELED_BLOCK_EXPR_CHECK (NODE), 1)
-/* In a EXIT_BLOCK_EXPR node. */
+/* In an EXIT_BLOCK_EXPR node. */
#define EXIT_BLOCK_LABELED_BLOCK(NODE) \
TREE_OPERAND (EXIT_BLOCK_EXPR_CHECK (NODE), 0)
#define EXIT_BLOCK_RETURN(NODE) TREE_OPERAND (EXIT_BLOCK_EXPR_CHECK (NODE), 1)
/* In a LOOP_EXPR node. */
#define LOOP_EXPR_BODY(NODE) TREE_OPERAND (LOOP_EXPR_CHECK (NODE), 0)
-/* In a EXPR_WITH_FILE_LOCATION node. */
+/* In an EXPR_WITH_FILE_LOCATION node. */
#define EXPR_WFL_EMIT_LINE_NOTE(NODE) \
(EXPR_WITH_FILE_LOCATION_CHECK (NODE)->common.public_flag)
#define EXPR_WFL_NODE(NODE) \
#define TARGET_EXPR_INITIAL(NODE) TREE_OPERAND (TARGET_EXPR_CHECK (NODE), 1)
#define TARGET_EXPR_CLEANUP(NODE) TREE_OPERAND (TARGET_EXPR_CHECK (NODE), 2)
-struct tree_exp
+struct tree_exp GTY(())
{
struct tree_common common;
int complexity;
- tree operands[1];
+ tree GTY ((special ("tree_exp"),
+ length ("TREE_CODE_LENGTH (TREE_CODE ((tree) &%h))")))
+ operands[1];
};
\f
/* In a BLOCK node. */
One of the logical block fragments is arbitrarily chosen to be
the ORIGIN. The other fragments will point to the origin via
BLOCK_FRAGMENT_ORIGIN; the origin itself will have this pointer
- be null. The list of fragments will be chained through
+ be null. The list of fragments will be chained through
BLOCK_FRAGMENT_CHAIN from the origin. */
#define BLOCK_FRAGMENT_ORIGIN(NODE) (BLOCK_CHECK (NODE)->block.fragment_origin)
#define BLOCK_FRAGMENT_CHAIN(NODE) (BLOCK_CHECK (NODE)->block.fragment_chain)
-struct tree_block
+struct tree_block GTY(())
{
struct tree_common common;
#define TYPE_PRECISION(NODE) (TYPE_CHECK (NODE)->type.precision)
#define TYPE_SYMTAB_ADDRESS(NODE) (TYPE_CHECK (NODE)->type.symtab.address)
#define TYPE_SYMTAB_POINTER(NODE) (TYPE_CHECK (NODE)->type.symtab.pointer)
+#define TYPE_SYMTAB_DIE(NODE) (TYPE_CHECK (NODE)->type.symtab.die)
#define TYPE_NAME(NODE) (TYPE_CHECK (NODE)->type.name)
#define TYPE_NEXT_VARIANT(NODE) (TYPE_CHECK (NODE)->type.next_variant)
#define TYPE_MAIN_VARIANT(NODE) (TYPE_CHECK (NODE)->type.main_variant)
#define MAX_POINTER_DEPTH 2
#define VA_LIST_POINTER_DEPTH 3
-struct tree_type
+struct die_struct;
+
+struct tree_type GTY(())
{
struct tree_common common;
tree values;
unsigned int align;
tree pointer_to;
tree reference_to;
- union {int address; char *pointer; } symtab;
+ union tree_type_symtab {
+ int address;
+ char * GTY ((tag ("1"))) pointer;
+ struct die_struct * GTY ((tag ("2"), skip (""))) die;
+ } GTY ((desc ("debug_hooks == &sdb_debug_hooks ? 1 : debug_hooks == &dwarf2_debug_hooks ? 2 : 0"),
+ descbits ("2"))) symtab;
tree name;
tree minval;
tree maxval;
from the base of the complete object to the base of the part of the
object that is allocated on behalf of this `type'.
This is always 0 except when there is multiple inheritance. */
-
+
#define BINFO_OFFSET(NODE) TREE_VEC_ELT ((NODE), 1)
#define TYPE_BINFO_OFFSET(NODE) BINFO_OFFSET (TYPE_BINFO (NODE))
#define BINFO_OFFSET_ZEROP(NODE) (integer_zerop (BINFO_OFFSET (NODE)))
base. The actual contents are language-dependent. Under the old
ABI, the C++ front-end uses a FIELD_DECL whose contents are a
pointer to the virtual base; under the new ABI this field is
- instead a INTEGER_CST giving an offset into the vtable where the
+ instead an INTEGER_CST giving an offset into the vtable where the
offset to the virtual base can be found. */
#define BINFO_VPTR_FIELD(NODE) TREE_VEC_ELT (NODE, 5)
DECL_ASSEMBLER_NAME has not yet been set, using this macro will not cause
the DECL_ASSEMBLER_NAME of either DECL to be set. In other words, the
semantics of using this macro, are different than saying:
-
+
SET_DECL_ASSEMBLER_NAME(DECL2, DECL_ASSEMBLER_NAME (DECL1))
which will try to set the DECL_ASSEMBLER_NAME for DECL1. */
#define COPY_DECL_ASSEMBLER_NAME(DECL1, DECL2) \
(DECL_ASSEMBLER_NAME_SET_P (DECL1) \
- ? (void) SET_DECL_ASSEMBLER_NAME (DECL2, \
- DECL_ASSEMBLER_NAME (DECL1)) \
+ ? (void) SET_DECL_ASSEMBLER_NAME (DECL2, \
+ DECL_ASSEMBLER_NAME (DECL1)) \
: (void) 0)
/* Records the section name in a section attribute. Used to pass
PROMOTED_MODE is defined, the mode of this expression may not be same
as DECL_MODE. In that case, DECL_MODE contains the mode corresponding
to the variable's data type, while the mode
- of DECL_RTL is the mode actually used to contain the data.
+ of DECL_RTL is the mode actually used to contain the data.
This value can be evaluated lazily for functions, variables with
static storage duration, and labels. */
/* In a TYPE_DECL
nonzero means the detail info about this type is not dumped into stabs.
- Instead it will generate cross reference ('x') of names.
+ Instead it will generate cross reference ('x') of names.
This uses the same flag as DECL_EXTERNAL. */
#define TYPE_DECL_SUPPRESS_DEBUG(NODE) \
(TYPE_DECL_CHECK (NODE)->decl.external_flag)
/* In a FUNCTION_DECL, nonzero if the function cannot be inlined. */
#define DECL_UNINLINABLE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.uninlinable)
+/* In a VAR_DECL, nonzero if the data should be allocated from
+ thread-local storage. */
+#define DECL_THREAD_LOCAL(NODE) (VAR_DECL_CHECK (NODE)->decl.thread_local_flag)
+
/* In a FUNCTION_DECL, the saved representation of the body of the
entire function. Usually a COMPOUND_STMT, but in C++ this may also
be a RETURN_INIT, CTOR_INITIALIZER, or TRY_BLOCK. */
struct function;
-struct tree_decl
+struct tree_decl GTY(())
{
struct tree_common common;
const char *filename;
unsigned non_addressable : 1;
unsigned user_align : 1;
unsigned uninlinable : 1;
- /* Three unused bits. */
+ unsigned thread_local_flag : 1;
+ /* Two unused bits. */
unsigned lang_flag_0 : 1;
unsigned lang_flag_1 : 1;
unsigned lang_flag_6 : 1;
unsigned lang_flag_7 : 1;
- union {
+ union tree_decl_u1 {
/* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
DECL_FUNCTION_CODE. */
enum built_in_function f;
HOST_WIDE_INT i;
/* DECL_ALIGN and DECL_OFFSET_ALIGN. (These are not used for
FUNCTION_DECLs). */
- struct {unsigned int align : 24; unsigned int off_align : 8;} a;
- } u1;
+ struct tree_decl_u1_a {
+ unsigned int align : 24;
+ unsigned int off_align : 8;
+ } a;
+ } GTY ((skip (""))) u1;
tree size_unit;
tree name;
In PARM_DECL, holds an RTL for the stack slot
of register where the data was actually passed.
Used by Chill and Java in LABEL_DECL and by C++ and Java in VAR_DECL. */
- union {
- struct function *f;
- rtx r;
- tree t;
+ union tree_decl_u2 {
+ struct function * GTY ((tag ("FUNCTION_DECL"))) f;
+ rtx GTY ((tag ("PARM_DECL"))) r;
+ tree GTY ((tag ("FIELD_DECL"))) t;
int i;
- } u2;
+ } GTY ((desc ("TREE_CODE((tree) &(%0))"))) u2;
/* In a FUNCTION_DECL, this is DECL_SAVED_TREE. */
tree saved_tree;
struct lang_decl *lang_specific;
};
\f
+enum tree_node_structure_enum {
+ TS_COMMON,
+ TS_INT_CST,
+ TS_REAL_CST,
+ TS_VECTOR,
+ TS_STRING,
+ TS_COMPLEX,
+ TS_IDENTIFIER,
+ TS_DECL,
+ TS_TYPE,
+ TS_LIST,
+ TS_VEC,
+ TS_EXP,
+ TS_BLOCK,
+ LAST_TS_ENUM
+};
+
/* Define the overall contents of a tree node.
It may be any of the structures declared above
for various types of node. */
-union tree_node
+union tree_node GTY ((ptr_alias (union lang_tree_node),
+ desc ("tree_node_structure (&%h)")))
{
- struct tree_common common;
- struct tree_int_cst int_cst;
- struct tree_real_cst real_cst;
- struct tree_vector vector;
- struct tree_string string;
- struct tree_complex complex;
- struct tree_identifier identifier;
- struct tree_decl decl;
- struct tree_type type;
- struct tree_list list;
- struct tree_vec vec;
- struct tree_exp exp;
- struct tree_block block;
+ 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;
+ struct tree_vector GTY ((tag ("TS_VECTOR"))) vector;
+ struct tree_string GTY ((tag ("TS_STRING"))) string;
+ struct tree_complex GTY ((tag ("TS_COMPLEX"))) complex;
+ struct tree_identifier GTY ((tag ("TS_IDENTIFIER"))) identifier;
+ struct tree_decl GTY ((tag ("TS_DECL"))) decl;
+ struct tree_type GTY ((tag ("TS_TYPE"))) type;
+ struct tree_list GTY ((tag ("TS_LIST"))) list;
+ struct tree_vec GTY ((tag ("TS_VEC"))) vec;
+ struct tree_exp GTY ((tag ("TS_EXP"))) exp;
+ struct tree_block GTY ((tag ("TS_BLOCK"))) block;
};
\f
/* Standard named or nameless data types of the C compiler. */
TI_UINTSI_TYPE,
TI_UINTDI_TYPE,
TI_UINTTI_TYPE,
-
+
TI_INTEGER_ZERO,
TI_INTEGER_ONE,
TI_INTEGER_MINUS_ONE,
TI_MAX
};
-extern tree global_trees[TI_MAX];
+extern GTY(()) tree global_trees[TI_MAX];
#define error_mark_node global_trees[TI_ERROR_MARK]
-
+
#define intQI_type_node global_trees[TI_INTQI_TYPE]
#define intHI_type_node global_trees[TI_INTHI_TYPE]
#define intSI_type_node global_trees[TI_INTSI_TYPE]
#define V16SF_type_node global_trees[TI_V16SF_TYPE]
/* An enumeration of the standard C integer types. These must be
- ordered so that shorter types appear before longer ones. */
-enum integer_type_kind
+ ordered so that shorter types appear before longer ones, and so
+ that signed types appear before unsigned ones, for the correct
+ functioning of interpret_integer() in c-lex.c. */
+enum integer_type_kind
{
itk_char,
itk_signed_char,
/* The standard C integer types. Use integer_type_kind to index into
this array. */
-extern tree integer_types[itk_none];
+extern GTY(()) tree integer_types[itk_none];
#define char_type_node integer_types[itk_char]
#define signed_char_type_node integer_types[itk_signed_char]
extern tree make_node PARAMS ((enum tree_code));
-/* Make a copy of a node, with all the same contents except
- for TREE_PERMANENT. (The copy is permanent
- iff nodes being made now are permanent.) */
+/* Make a copy of a node, with all the same contents. */
extern tree copy_node PARAMS ((tree));
extern tree build_int_2_wide PARAMS ((unsigned HOST_WIDE_INT, HOST_WIDE_INT));
extern tree build_vector PARAMS ((tree, tree));
-extern tree build_real PARAMS ((tree, REAL_VALUE_TYPE));
extern tree build_real_from_int_cst PARAMS ((tree, tree));
extern tree build_complex PARAMS ((tree, tree, tree));
extern tree build_string PARAMS ((int, const char *));
extern void default_insert_attributes PARAMS ((tree, tree *));
extern bool default_function_attribute_inlinable_p PARAMS ((tree));
extern bool default_ms_bitfield_layout_p PARAMS ((tree));
+struct cpp_reader;
+extern void default_register_cpp_builtins PARAMS ((struct cpp_reader *));
/* Split a list of declspecs and attributes into two. */
UBITSIZETYPE, /* Unsifgned representation of sizes in bits. */
TYPE_KIND_LAST};
-extern tree sizetype_tab[(int) TYPE_KIND_LAST];
+extern GTY(()) tree sizetype_tab[(int) TYPE_KIND_LAST];
#define sizetype sizetype_tab[(int) SIZETYPE]
#define bitsizetype sizetype_tab[(int) BITSIZETYPE]
extern int first_rtl_op PARAMS ((enum tree_code));
+/* Return which tree structure is used by T. */
+
+enum tree_node_structure_enum tree_node_structure PARAMS ((tree));
+
/* unsave_expr (EXP) returns an expression equivalent to EXP but it
can be used multiple times and will evaluate EXP in its entirety
each time. */
/* Points to the FUNCTION_DECL of the function whose body we are reading. */
-extern tree current_function_decl;
+extern GTY(()) tree current_function_decl;
/* Nonzero means a FUNC_BEGIN label was emitted. */
-extern tree current_function_func_begin_label;
+extern GTY(()) tree current_function_func_begin_label;
/* Nonzero means all ..._TYPE nodes should be allocated permanently. */
extern int int_fits_type_p PARAMS ((tree, tree));
extern int tree_log2 PARAMS ((tree));
extern int tree_floor_log2 PARAMS ((tree));
-extern void preserve_data PARAMS ((void));
-extern int object_permanent_p PARAMS ((tree));
-extern int type_precision PARAMS ((tree));
extern int simple_cst_equal PARAMS ((tree, tree));
extern int compare_tree_int PARAMS ((tree,
unsigned HOST_WIDE_INT));
extern int real_onep PARAMS ((tree));
extern int real_twop PARAMS ((tree));
+extern int real_minus_onep PARAMS ((tree));
extern void gcc_obstack_init PARAMS ((struct obstack *));
extern void init_obstacks PARAMS ((void));
extern void build_common_tree_nodes PARAMS ((int));
extern void build_common_tree_nodes_2 PARAMS ((int));
-extern void mark_tree_hashtable PARAMS ((void *));
/* In function.c */
extern void setjmp_protect_args PARAMS ((void));
extern void pop_function_context PARAMS ((void));
extern void push_function_context_to PARAMS ((tree));
extern void pop_function_context_from PARAMS ((tree));
-extern void ggc_mark_struct_function PARAMS ((struct function *));
/* In print-rtl.c */
#ifdef BUFSIZ
extern void expand_asm_operands PARAMS ((tree, tree, tree, tree, int,
const char *, int));
extern int any_pending_cleanups PARAMS ((int));
-extern void init_stmt PARAMS ((void));
extern void init_stmt_for_function PARAMS ((void));
extern int drop_through_at_end_p PARAMS ((void));
extern void expand_start_target_temps PARAMS ((void));