See the accessor macros, defined below, for documentation of the
fields. */
-union tree_ann_d;
struct GTY(()) tree_base {
ENUM_BITFIELD(tree_code) code : 16;
unsigned packed_flag : 1;
unsigned user_align : 1;
- unsigned spare : 21;
+ unsigned spare : 13;
- union tree_ann_d *ann;
+ /* This field is only used with type nodes; the only reason it is present
+ in tree_base instead of tree_type is to save space. The size of the
+ field must be large enough to hold addr_space_t values. */
+ unsigned address_space : 8;
};
struct GTY(()) tree_common {
#define TREE_THIS_NOTRAP(NODE) ((NODE)->base.nothrow_flag)
/* In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node,
- nonzero means it may not be the lhs of an assignment.
+ nonzero means it may not be the lhs of an assignment.
Nonzero in a FUNCTION_DECL means this function should be treated
as "const" function (can only read its arguments). */
#define TREE_READONLY(NODE) (NON_TYPE_CHECK (NODE)->base.readonly_flag)
/* The "canonical" type for this type node, which can be used to
compare the type for equality with another type. If two types are
equal (based on the semantics of the language), then they will have
- equivalent TYPE_CANONICAL entries.
+ equivalent TYPE_CANONICAL entries.
As a special case, if TYPE_CANONICAL is NULL_TREE, then it cannot
be used for comparison against other types. Instead, the type is
the term. */
#define TYPE_RESTRICT(NODE) (TYPE_CHECK (NODE)->type.restrict_flag)
+/* The address space the type is in. */
+#define TYPE_ADDR_SPACE(NODE) (TYPE_CHECK (NODE)->base.address_space)
+
/* There is a TYPE_QUAL value for each type qualifier. They can be
combined by bitwise-or to form the complete set of qualifiers for a
type. */
#define TYPE_QUAL_VOLATILE 0x2
#define TYPE_QUAL_RESTRICT 0x4
+/* Encode/decode the named memory support as part of the qualifier. If more
+ than 8 qualifiers are added, these macros need to be adjusted. */
+#define ENCODE_QUAL_ADDR_SPACE(NUM) ((NUM & 0xFF) << 8)
+#define DECODE_QUAL_ADDR_SPACE(X) (((X) >> 8) & 0xFF)
+
+/* Return all qualifiers except for the address space qualifiers. */
+#define CLEAR_QUAL_ADDR_SPACE(X) ((X) & ~0xFF00)
+
+/* Only keep the address space out of the qualifiers and discard the other
+ qualifiers. */
+#define KEEP_QUAL_ADDR_SPACE(X) ((X) & 0xFF00)
+
/* The set of type qualifiers for this type. */
#define TYPE_QUALS(NODE) \
((TYPE_READONLY (NODE) * TYPE_QUAL_CONST) \
| (TYPE_VOLATILE (NODE) * TYPE_QUAL_VOLATILE) \
+ | (TYPE_RESTRICT (NODE) * TYPE_QUAL_RESTRICT) \
+ | (ENCODE_QUAL_ADDR_SPACE (TYPE_ADDR_SPACE (NODE))))
+
+/* The same as TYPE_QUALS without the address space qualifications. */
+#define TYPE_QUALS_NO_ADDR_SPACE(NODE) \
+ ((TYPE_READONLY (NODE) * TYPE_QUAL_CONST) \
+ | (TYPE_VOLATILE (NODE) * TYPE_QUAL_VOLATILE) \
| (TYPE_RESTRICT (NODE) * TYPE_QUAL_RESTRICT))
/* These flags are available for each language front end to use internally. */
int eh_landing_pad_nr;
};
+struct var_ann_d;
struct GTY(()) tree_result_decl {
struct tree_decl_with_rtl common;
+ struct var_ann_d *ann;
};
struct GTY(()) tree_const_decl {
struct GTY(()) tree_parm_decl {
struct tree_decl_with_rtl common;
rtx incoming_rtl;
+ struct var_ann_d *ann;
};
/* A replaceable function is one which may be replaced at link-time
with an entirely different definition, provided that the
replacement has the same type. For example, functions declared
- with __attribute__((weak)) on most systems are replaceable.
+ with __attribute__((weak)) on most systems are replaceable.
COMDAT functions are not replaceable, since all definitions of the
function must be equivalent. It is important that COMDAT functions
not be treated as replaceable so that use of C++ template
- instantiations is not penalized.
+ instantiations is not penalized.
For example, DECL_REPLACEABLE is used to determine whether or not a
function (including a template instantiation) which is not
(VAR_DECL_CHECK (NODE)->decl_with_vis.init_priority_p)
/* For a VAR_DECL or FUNCTION_DECL the initialization priority of
- NODE. */
+ NODE. */
#define DECL_INIT_PRIORITY(NODE) \
(decl_init_priority_lookup (NODE))
/* Set the initialization priority for NODE to VAL. */
#define DECL_THREAD_LOCAL_P(NODE) \
(VAR_DECL_CHECK (NODE)->decl_with_vis.tls_model >= TLS_MODEL_REAL)
+#define DECL_VAR_ANN_PTR(NODE) \
+ (TREE_CODE (NODE) == VAR_DECL ? &(NODE)->var_decl.ann \
+ : TREE_CODE (NODE) == PARM_DECL ? &(NODE)->parm_decl.ann \
+ : TREE_CODE (NODE) == RESULT_DECL ? &(NODE)->result_decl.ann \
+ : NULL)
+
struct GTY(()) tree_var_decl {
struct tree_decl_with_vis common;
+ struct var_ann_d *ann;
};
extern tree gimple_fold_builtin_snprintf_chk (gimple, tree, enum built_in_function);
extern tree make_range (tree, int *, tree *, tree *, bool *);
extern tree build_range_check (location_t, tree, tree, int, tree, tree);
-extern bool merge_ranges (int *, tree *, tree *, int, tree, tree, int,
+extern bool merge_ranges (int *, tree *, tree *, int, tree, tree, int,
tree, tree);
extern void set_builtin_user_assembler_name (tree decl, const char *asmspec);
extern void dwarf2out_window_save (const char *);
-/* Add a CFI to update the running total of the size of arguments pushed
- onto the stack. */
-
-extern void dwarf2out_args_size (const char *, HOST_WIDE_INT);
-
/* Entry point for saving a register to the stack. */
extern void dwarf2out_reg_save (const char *, unsigned, HOST_WIDE_INT);
/* In ipa-reference.c. Used for parsing attributes of asm code. */
extern GTY(()) tree memory_identifier_string;
-/* Compute the number of operands in an expression node NODE. For
+/* Compute the number of operands in an expression node NODE. For
tcc_vl_exp nodes like CALL_EXPRs, this is stored in the node itself,
otherwise it is looked up from the node's code. */
static inline int