/* Core data structures for the 'tree' type.
- Copyright (C) 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1989-2024 Free Software Foundation, Inc.
This file is part of GCC.
struct real_value;
struct fixed_value;
struct ptr_info_def;
-struct range_info_def;
struct die_struct;
/* Nonzero if this is a cold function. */
#define ECF_COLD (1 << 15)
+/* Nonzero if this is a function expected to end with an exception. */
+#define ECF_XTHROW (1 << 16)
+
/* Call argument flags. */
-/* Nonzero if the argument is not dereferenced recursively, thus only
- directly reachable memory is read or written. */
-#define EAF_DIRECT (1 << 0)
+
+/* Nonzero if the argument is not used by the function. */
+#define EAF_UNUSED (1 << 1)
+
+/* Following flags come in pairs. First one is about direct dereferences
+ from the parameter, while the second is about memory reachable by
+ recursive dereferences. */
/* Nonzero if memory reached by the argument is not clobbered. */
-#define EAF_NOCLOBBER (1 << 1)
+#define EAF_NO_DIRECT_CLOBBER (1 << 2)
+#define EAF_NO_INDIRECT_CLOBBER (1 << 3)
/* Nonzero if the argument does not escape. */
-#define EAF_NOESCAPE (1 << 2)
+#define EAF_NO_DIRECT_ESCAPE (1 << 4)
+#define EAF_NO_INDIRECT_ESCAPE (1 << 5)
-/* Nonzero if the argument is not used by the function. */
-#define EAF_UNUSED (1 << 3)
+/* Nonzero if the argument does not escape to return value. */
+#define EAF_NOT_RETURNED_DIRECTLY (1 << 6)
+#define EAF_NOT_RETURNED_INDIRECTLY (1 << 7)
+
+/* Nonzero if the argument is not read. */
+#define EAF_NO_DIRECT_READ (1 << 8)
+#define EAF_NO_INDIRECT_READ (1 << 9)
/* Call return flags. */
/* Mask for the argument number that is returned. Lower two bits of
BUILT_IN_NORMAL
};
-/* Last marker used for LTO stremaing of built_in_class. We can not add it
+/* Last marker used for LTO stremaing of built_in_class. We cannot add it
to the enum since we need the enumb to fit in 2 bits. */
#define BUILT_IN_LAST (BUILT_IN_NORMAL + 1)
reductions. */
OMP_CLAUSE_REDUCTION,
+ /* OpenMP clause: task_reduction (operator:variable_list). */
+ OMP_CLAUSE_TASK_REDUCTION,
+
+ /* OpenMP clause: in_reduction (operator:variable_list). */
+ OMP_CLAUSE_IN_REDUCTION,
+
/* OpenMP clause: copyin (variable_list). */
OMP_CLAUSE_COPYIN,
/* OpenMP clause: linear (variable-list[:linear-step]). */
OMP_CLAUSE_LINEAR,
+ /* OpenMP clause: affinity([depend-modifier :] variable-list). */
+ OMP_CLAUSE_AFFINITY,
+
/* OpenMP clause: aligned (variable-list[:alignment]). */
OMP_CLAUSE_ALIGNED,
+ /* OpenMP clause: allocate ([allocator:]variable-list). */
+ OMP_CLAUSE_ALLOCATE,
+
/* OpenMP clause: depend ({in,out,inout}:variable-list). */
OMP_CLAUSE_DEPEND,
+ /* OpenMP clause: nontemporal (variable-list). */
+ OMP_CLAUSE_NONTEMPORAL,
+
/* OpenMP clause: uniform (argument-list). */
OMP_CLAUSE_UNIFORM,
- /* OpenMP clause: to (extended-list).
- Only when it appears in declare target. */
- OMP_CLAUSE_TO_DECLARE,
+ /* OpenMP clause: enter (extended-list).
+ to is a deprecated alias when it appears in declare target. */
+ OMP_CLAUSE_ENTER,
/* OpenMP clause: link (variable-list). */
OMP_CLAUSE_LINK,
+ /* OpenMP clause: detach (event-handle). */
+ OMP_CLAUSE_DETACH,
+
+ /* OpenACC clause: use_device (variable-list).
+ OpenMP clause: use_device_ptr (ptr-list). */
+ OMP_CLAUSE_USE_DEVICE_PTR,
+
+ /* OpenMP clause: use_device_addr (variable-list). */
+ OMP_CLAUSE_USE_DEVICE_ADDR,
+
+ /* OpenMP clause: is_device_ptr (variable-list). */
+ OMP_CLAUSE_IS_DEVICE_PTR,
+
+ /* OpenMP clause: inclusive (variable-list). */
+ OMP_CLAUSE_INCLUSIVE,
+
+ /* OpenMP clause: exclusive (variable-list). */
+ OMP_CLAUSE_EXCLUSIVE,
+
/* OpenMP clause: from (variable-list). */
OMP_CLAUSE_FROM,
OpenMP clause: map ({alloc:,to:,from:,tofrom:,}variable-list). */
OMP_CLAUSE_MAP,
- /* OpenACC clause: use_device (variable_list).
- OpenMP clause: use_device_ptr (variable-list). */
- OMP_CLAUSE_USE_DEVICE_PTR,
+ /* OpenMP clause: has_device_addr (variable-list). */
+ OMP_CLAUSE_HAS_DEVICE_ADDR,
- /* OpenMP clause: is_device_ptr (variable-list). */
- OMP_CLAUSE_IS_DEVICE_PTR,
+ /* OpenMP clause: doacross ({source,sink}:vec). */
+ OMP_CLAUSE_DOACROSS,
+
+ /* OpenMP clause: indirect [(constant-integer-expression)]. */
+ OMP_CLAUSE_INDIRECT,
/* Internal structure to hold OpenACC cache directive's variable-list.
#pragma acc cache (variable-list). */
/* Internal clause: temporary for combined loops expansion. */
OMP_CLAUSE__LOOPTEMP_,
+ /* Internal clause: temporary for task reductions. */
+ OMP_CLAUSE__REDUCTEMP_,
+
+ /* Internal clause: temporary for lastprivate(conditional:). */
+ OMP_CLAUSE__CONDTEMP_,
+
+ /* Internal clause: temporary for inscan reductions. */
+ OMP_CLAUSE__SCANTEMP_,
+
/* OpenACC/OpenMP clause: if (scalar-expression). */
OMP_CLAUSE_IF,
+ /* OpenACC clause: self. */
+ OMP_CLAUSE_SELF,
+
/* OpenMP clause: num_threads (integer-expression). */
OMP_CLAUSE_NUM_THREADS,
/* OpenMP clause: simdlen (constant-integer-expression). */
OMP_CLAUSE_SIMDLEN,
+ /* OpenMP clause: device_type ({host,nohost,any}). */
+ OMP_CLAUSE_DEVICE_TYPE,
+
/* OpenMP clause: for. */
OMP_CLAUSE_FOR,
/* OpenMP clause: defaultmap (tofrom: scalar). */
OMP_CLAUSE_DEFAULTMAP,
+ /* OpenMP clause: order (concurrent). */
+ OMP_CLAUSE_ORDER,
+
+ /* OpenMP clause: bind (binding). */
+ OMP_CLAUSE_BIND,
+
+ /* OpenMP clause: filter (integer-expression). */
+ OMP_CLAUSE_FILTER,
+
/* Internally used only clause, holding SIMD uid. */
OMP_CLAUSE__SIMDUID_,
/* OpenACC clause: tile ( size-expr-list ). */
OMP_CLAUSE_TILE,
- /* OpenMP internal-only clause to specify grid dimensions of a gridified
- kernel. */
- OMP_CLAUSE__GRIDDIM_,
-
/* OpenACC clause: if_present. */
OMP_CLAUSE_IF_PRESENT,
/* OpenACC clause: finalize. */
- OMP_CLAUSE_FINALIZE
+ OMP_CLAUSE_FINALIZE,
+
+ /* OpenACC clause: nohost. */
+ OMP_CLAUSE_NOHOST,
};
#undef DEFTREESTRUCT
OMP_CLAUSE_DEFAULT_LAST
};
+enum omp_clause_defaultmap_kind {
+ OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED,
+ OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALL,
+ OMP_CLAUSE_DEFAULTMAP_CATEGORY_SCALAR,
+ OMP_CLAUSE_DEFAULTMAP_CATEGORY_AGGREGATE,
+ OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALLOCATABLE,
+ OMP_CLAUSE_DEFAULTMAP_CATEGORY_POINTER,
+ OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK = 7,
+ OMP_CLAUSE_DEFAULTMAP_ALLOC = 1 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
+ OMP_CLAUSE_DEFAULTMAP_TO = 2 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
+ OMP_CLAUSE_DEFAULTMAP_FROM = 3 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
+ OMP_CLAUSE_DEFAULTMAP_TOFROM = 4 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
+ OMP_CLAUSE_DEFAULTMAP_FIRSTPRIVATE
+ = 5 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
+ OMP_CLAUSE_DEFAULTMAP_NONE = 6 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
+ OMP_CLAUSE_DEFAULTMAP_DEFAULT
+ = 7 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
+ OMP_CLAUSE_DEFAULTMAP_PRESENT = 8 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
+ OMP_CLAUSE_DEFAULTMAP_MASK = 15 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1)
+};
+
+enum omp_clause_bind_kind {
+ OMP_CLAUSE_BIND_TEAMS,
+ OMP_CLAUSE_BIND_PARALLEL,
+ OMP_CLAUSE_BIND_THREAD
+};
+
+/* memory-order-clause on OpenMP atomic/flush constructs or
+ argument of atomic_default_mem_order clause. */
+enum omp_memory_order {
+ OMP_MEMORY_ORDER_UNSPECIFIED,
+ OMP_MEMORY_ORDER_RELAXED,
+ OMP_MEMORY_ORDER_ACQUIRE,
+ OMP_MEMORY_ORDER_RELEASE,
+ OMP_MEMORY_ORDER_ACQ_REL,
+ OMP_MEMORY_ORDER_SEQ_CST,
+ OMP_MEMORY_ORDER_MASK = 7,
+ OMP_FAIL_MEMORY_ORDER_UNSPECIFIED = OMP_MEMORY_ORDER_UNSPECIFIED * 8,
+ OMP_FAIL_MEMORY_ORDER_RELAXED = OMP_MEMORY_ORDER_RELAXED * 8,
+ OMP_FAIL_MEMORY_ORDER_ACQUIRE = OMP_MEMORY_ORDER_ACQUIRE * 8,
+ OMP_FAIL_MEMORY_ORDER_RELEASE = OMP_MEMORY_ORDER_RELEASE * 8,
+ OMP_FAIL_MEMORY_ORDER_ACQ_REL = OMP_MEMORY_ORDER_ACQ_REL * 8,
+ OMP_FAIL_MEMORY_ORDER_SEQ_CST = OMP_MEMORY_ORDER_SEQ_CST * 8,
+ OMP_FAIL_MEMORY_ORDER_MASK = OMP_MEMORY_ORDER_MASK * 8
+};
+#define OMP_FAIL_MEMORY_ORDER_SHIFT 3
+
/* 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. */
TI_UINT16_TYPE,
TI_UINT32_TYPE,
TI_UINT64_TYPE,
+ TI_UINT128_TYPE,
TI_VOID,
TI_DOUBLE_TYPE,
TI_LONG_DOUBLE_TYPE,
+ /* __bf16 type if supported (used in C++ as std::bfloat16_t). */
+ TI_BFLOAT16_TYPE,
+
/* The _FloatN and _FloatNx types must be consecutive, and in the
same sequence as the corresponding complex types, which must also
be consecutive; _FloatN must come before _FloatNx; the order must
- TI_FLOATN_NX_TYPE_FIRST \
+ 1)
+ /* Type used by certain backends for __float128, which in C++ should be
+ distinct type from _Float128 for backwards compatibility reasons. */
+ TI_FLOAT128T_TYPE,
+
/* Put the complex types after their component types, so that in (sequential)
tree streaming we can assert that their component types have already been
- handled (see tree-streamer.c:record_common_node). */
+ handled (see tree-streamer.cc:record_common_node). */
TI_COMPLEX_INTEGER_TYPE,
TI_COMPLEX_FLOAT_TYPE,
TI_COMPLEX_DOUBLE_TYPE,
TI_DFLOAT32_TYPE,
TI_DFLOAT64_TYPE,
TI_DFLOAT128_TYPE,
- TI_DFLOAT32_PTR_TYPE,
- TI_DFLOAT64_PTR_TYPE,
- TI_DFLOAT128_PTR_TYPE,
TI_VOID_LIST_NODE,
TI_SAT_UDA_TYPE,
TI_SAT_UTA_TYPE,
+ TI_MODULE_HWM,
+ /* Nodes below here change during compilation, and should therefore
+ not be in the C++ module's global tree table. */
+
TI_OPTIMIZATION_DEFAULT,
TI_OPTIMIZATION_CURRENT,
TI_TARGET_OPTION_DEFAULT,
TI_CURRENT_TARGET_PRAGMA,
TI_CURRENT_OPTIMIZE_PRAGMA,
+ TI_CHREC_DONT_KNOW,
+ TI_CHREC_KNOWN,
+
TI_MAX
};
/* An enumeration of the standard C integer types. These must be
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. */
+ functioning of interpret_integer() in c-lex.cc. */
enum integer_type_kind {
itk_char,
itk_signed_char,
are not in fact compatible with the function type. */
ATTR_FLAG_BUILT_IN = 16,
/* A given attribute has been parsed as a C++-11 attribute. */
- ATTR_FLAG_CXX11 = 32
+ ATTR_FLAG_CXX11 = 32,
+ /* The attribute handler is being invoked with an internal argument
+ that may not otherwise be valid when specified in source code. */
+ ATTR_FLAG_INTERNAL = 64
};
/* Types used to represent sizes. */
stk_type_kind_last
};
+/* Flags controlling operand_equal_p() behavior. */
enum operand_equal_flag {
OEP_ONLY_CONST = 1,
OEP_PURE_SAME = 2,
/* Internal within inchash::add_expr: */
OEP_HASH_CHECK = 32,
/* Makes operand_equal_p handle more expressions: */
- OEP_LEXICOGRAPHIC = 64
+ OEP_LEXICOGRAPHIC = 64,
+ OEP_BITWISE = 128,
+ /* For OEP_ADDRESS_OF of COMPONENT_REFs, only consider same fields as
+ equivalent rather than also different fields with the same offset. */
+ OEP_ADDRESS_OF_SAME_FIELD = 256,
+ /* In conjunction with OEP_LEXICOGRAPHIC considers names of declarations
+ of the same kind. Used to compare VLA bounds involving parameters
+ across redeclarations of the same function. */
+ OEP_DECL_NAME = 512
};
/* Enum and arrays used for tree allocation stats.
- Keep in sync with tree.c:tree_node_kind_names. */
+ Keep in sync with tree.cc:tree_node_kind_names. */
enum tree_node_kind {
d_kind,
t_kind,
annot_expr_kind_last
};
+/* The kind of a TREE_CLOBBER_P CONSTRUCTOR node. Other than _UNDEF, these are
+ in roughly sequential order. */
+enum clobber_kind {
+ /* Unspecified, this clobber acts as a store of an undefined value. */
+ CLOBBER_UNDEF,
+ /* Beginning of storage duration, e.g. malloc. */
+ CLOBBER_STORAGE_BEGIN,
+ /* Beginning of object lifetime, e.g. C++ constructor. */
+ CLOBBER_OBJECT_BEGIN,
+ /* End of object lifetime, e.g. C++ destructor. */
+ CLOBBER_OBJECT_END,
+ /* End of storage duration, e.g. free. */
+ CLOBBER_STORAGE_END,
+ CLOBBER_LAST
+};
+
/*---------------------------------------------------------------------------
Type definitions
---------------------------------------------------------------------------*/
unsigned user_align : 1;
unsigned nameless_flag : 1;
unsigned atomic_flag : 1;
- unsigned spare0 : 3;
+ unsigned unavailable_flag : 1;
+ unsigned spare0 : 2;
unsigned spare1 : 8;
- /* This field is only used with TREE_TYPE nodes; the only reason it is
+ /* For _TYPE nodes, this is TYPE_ADDR_SPACE; the 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. */
+ of the field must be large enough to hold addr_space_t values.
+ For CONSTRUCTOR nodes this holds the clobber_kind enum.
+ The C++ front-end uses this in IDENTIFIER_NODE and NAMESPACE_DECL. */
unsigned address_space : 8;
} bits;
struct {
/* The number of HOST_WIDE_INTs if the INTEGER_CST is accessed in
its native precision. */
- unsigned char unextended;
+ unsigned short unextended;
/* The number of HOST_WIDE_INTs if the INTEGER_CST is extended to
wider precisions based on its TYPE_SIGN. */
- unsigned char extended;
-
- /* The number of HOST_WIDE_INTs if the INTEGER_CST is accessed in
- offset_int precision, with smaller integers being extended
- according to their TYPE_SIGN. This is equal to one of the two
- fields above but is cached for speed. */
- unsigned char offset;
+ unsigned short extended;
} int_length;
/* VEC length. This field is only used with TREE_VEC. */
/* Internal function code. */
enum internal_fn ifn;
+ /* OMP_ATOMIC* memory order. */
+ enum omp_memory_order omp_atomic_memory_order;
+
/* The following two fields are used for MEM_REF and TARGET_MEM_REF
expression trees and specify known data non-dependences. For
two memory references in a function they are known to not
alias if dependence_info.clique are equal and dependence_info.base
- are distinct. */
+ are distinct. Clique number zero means there is no information,
+ clique number one is populated from function global information
+ and thus needs no remapping on transforms like loop unrolling. */
struct {
unsigned short clique;
unsigned short base;
PREDICT_EXPR_OUTCOME in
PREDICT_EXPR
+ OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE in
+ OMP_CLAUSE
+
static_flag:
TREE_STATIC in
TRANSACTION_EXPR_OUTER in
TRANSACTION_EXPR
- SSA_NAME_ANTI_RANGE_P in
- SSA_NAME
-
MUST_TAIL_CALL in
CALL_EXPR
OMP_CLAUSE_MAP
OMP_CLAUSE_REDUCTION_OMP_ORIG_REF in
- OMP_CLAUSE_REDUCTION
+ OMP_CLAUSE_{,TASK_,IN_}REDUCTION
+
+ OMP_CLAUSE_USE_DEVICE_PTR_IF_PRESENT in
+ OMP_CLAUSE_USE_DEVICE_PTR
TRANSACTION_EXPR_RELAXED in
TRANSACTION_EXPR
OMP_PARALLEL_COMBINED in
OMP_PARALLEL
- OMP_ATOMIC_SEQ_CST in
- OMP_ATOMIC*
-
OMP_CLAUSE_PRIVATE_OUTER_REF in
OMP_CLAUSE_PRIVATE
all decls
CALL_FROM_THUNK_P and
- CALL_ALLOCA_FOR_VAR_P in
+ CALL_ALLOCA_FOR_VAR_P and
+ CALL_FROM_NEW_OR_DELETE_P in
CALL_EXPR
OMP_CLAUSE_LINEAR_VARIABLE_STRIDE in
OMP_CLAUSE_LINEAR
+ ASM_INLINE_P in
+ ASM_EXPR
+
side_effects_flag:
TREE_SIDE_EFFECTS in
DECL_NONALIASED in
VAR_DECL
+ CHREC_NOWRAP in
+ POLYNOMIAL_CHREC
+
deprecated_flag:
TREE_DEPRECATED in
SSA_NAME_POINTS_TO_READONLY_MEMORY in
SSA_NAME
+ unavailable_flag:
+
+ TREE_UNAVAILABLE in
+ all decls
+ all types
+
visited:
TREE_VISITED in
CALL_EXPR_BY_DESCRIPTOR in
CALL_EXPR
+
*/
struct GTY(()) tree_typed {
struct GTY(()) tree_real_cst {
struct tree_typed typed;
- struct real_value * real_cst_ptr;
+ struct real_value value;
};
struct GTY(()) tree_fixed_cst {
OMP_CLAUSE_DEPEND_IN,
OMP_CLAUSE_DEPEND_OUT,
OMP_CLAUSE_DEPEND_INOUT,
- OMP_CLAUSE_DEPEND_SOURCE,
- OMP_CLAUSE_DEPEND_SINK,
+ OMP_CLAUSE_DEPEND_MUTEXINOUTSET,
+ OMP_CLAUSE_DEPEND_INOUTSET,
+ OMP_CLAUSE_DEPEND_DEPOBJ,
+ OMP_CLAUSE_DEPEND_INVALID,
OMP_CLAUSE_DEPEND_LAST
};
+enum omp_clause_doacross_kind
+{
+ OMP_CLAUSE_DOACROSS_SOURCE,
+ OMP_CLAUSE_DOACROSS_SINK,
+ OMP_CLAUSE_DOACROSS_LAST
+};
+
enum omp_clause_proc_bind_kind
{
/* Numbers should match omp_proc_bind_t enum in omp.h. */
OMP_CLAUSE_PROC_BIND_FALSE = 0,
OMP_CLAUSE_PROC_BIND_TRUE = 1,
+ OMP_CLAUSE_PROC_BIND_PRIMARY = 2,
OMP_CLAUSE_PROC_BIND_MASTER = 2,
OMP_CLAUSE_PROC_BIND_CLOSE = 3,
OMP_CLAUSE_PROC_BIND_SPREAD = 4,
OMP_CLAUSE_PROC_BIND_LAST
};
+enum omp_clause_device_type_kind
+{
+ OMP_CLAUSE_DEVICE_TYPE_HOST = 1,
+ OMP_CLAUSE_DEVICE_TYPE_NOHOST = 2,
+ OMP_CLAUSE_DEVICE_TYPE_ANY = 3
+};
+
enum omp_clause_linear_kind
{
OMP_CLAUSE_LINEAR_DEFAULT,
struct GTY(()) tree_exp {
struct tree_typed typed;
location_t locus;
- tree GTY ((special ("tree_exp"),
- desc ("TREE_CODE ((tree) &%0)")))
- operands[1];
+ tree GTY ((length ("TREE_OPERAND_LENGTH ((tree)&%h)"))) operands[1];
};
/* Immediate use linking structure. This structure is used for maintaining
/* Value range information. */
union ssa_name_info_type {
- /* Pointer attributes used for alias analysis. */
+ /* Range and aliasing info for pointers. */
struct GTY ((tag ("0"))) ptr_info_def *ptr_info;
- /* Value range attributes used for zero/sign extension elimination. */
- struct GTY ((tag ("1"))) range_info_def *range_info;
+ /* Range info for everything else. */
+ struct GTY ((tag ("1"))) vrange_storage * range_info;
} GTY ((desc ("%1.typed.type ?" \
"!POINTER_TYPE_P (TREE_TYPE ((tree)&%1)) : 2"))) info;
-
/* Immediate uses list for this SSA_NAME. */
struct ssa_use_operand_t imm_uses;
};
enum omp_clause_default_kind default_kind;
enum omp_clause_schedule_kind schedule_kind;
enum omp_clause_depend_kind depend_kind;
+ enum omp_clause_doacross_kind doacross_kind;
/* See include/gomp-constants.h for enum gomp_map_kind's values. */
unsigned int map_kind;
enum omp_clause_proc_bind_kind proc_bind_kind;
enum tree_code reduction_code;
enum omp_clause_linear_kind linear_kind;
enum tree_code if_modifier;
- /* The dimension a OMP_CLAUSE__GRIDDIM_ clause of a gridified target
- construct describes. */
- unsigned int dimension;
+ enum omp_clause_defaultmap_kind defaultmap_kind;
+ enum omp_clause_bind_kind bind_kind;
+ enum omp_clause_device_type_kind device_type_kind;
} GTY ((skip)) subcode;
/* The gimplification of OMP_CLAUSE_REDUCTION_{INIT,MERGE} for omp-low's
tree attributes;
unsigned int uid;
- unsigned int precision : 10;
- unsigned no_force_blk_flag : 1;
- unsigned needs_constructing_flag : 1;
- unsigned transparent_aggr_flag : 1;
- unsigned restrict_flag : 1;
- unsigned contains_placeholder_bits : 2;
-
- ENUM_BITFIELD(machine_mode) mode : 8;
+ ENUM_BITFIELD(machine_mode) mode : MACHINE_MODE_BITSIZE;
- unsigned string_flag : 1;
+ unsigned int precision : 16;
unsigned lang_flag_0 : 1;
unsigned lang_flag_1 : 1;
unsigned lang_flag_2 : 1;
so we need to store the value 32 (not 31, as we need the zero
as well), hence six bits. */
unsigned align : 6;
+ /* TYPE_STRING_FLAG for INTEGER_TYPE and ARRAY_TYPE.
+ TYPE_CXX_ODR_P for RECORD_TYPE and UNION_TYPE. */
+ unsigned string_flag : 1;
+ unsigned no_force_blk_flag : 1;
+
unsigned warn_if_not_align : 6;
+ unsigned needs_constructing_flag : 1;
+ unsigned transparent_aggr_flag : 1;
+
+ unsigned contains_placeholder_bits : 2;
+ unsigned restrict_flag : 1;
unsigned typeless_storage : 1;
unsigned empty_flag : 1;
- unsigned spare : 17;
+ unsigned indivisible_p : 1;
+ /* TYPE_NO_NAMED_ARGS_STDARG_P for a stdarg function.
+ Or TYPE_INCLUDES_FLEXARRAY for RECORD_TYPE and UNION_TYPE. */
+ unsigned no_named_args_stdarg_p : 1;
+ unsigned spare : 1;
alias_set_type alias_set;
tree pointer_to;
struct tree_decl_minimal common;
tree size;
- ENUM_BITFIELD(machine_mode) mode : 8;
+ ENUM_BITFIELD(machine_mode) mode : MACHINE_MODE_BITSIZE;
unsigned nonlocal_flag : 1;
unsigned virtual_flag : 1;
unsigned lang_flag_8 : 1;
/* In VAR_DECL and PARM_DECL, this is DECL_REGISTER
- IN TRANSLATION_UNIT_DECL, this is TRANSLATION_UNIT_WARN_EMPTY_P. */
+ In TRANSLATION_UNIT_DECL, this is TRANSLATION_UNIT_WARN_EMPTY_P.
+ In FIELD_DECL, this is DECL_FIELD_ABI_IGNORED. */
unsigned decl_flag_0 : 1;
/* In FIELD_DECL, this is DECL_BIT_FIELD
In VAR_DECL and FUNCTION_DECL, this is DECL_EXTERNAL.
In VAR_DECL, PARM_DECL and RESULT_DECL, this is
DECL_HAS_VALUE_EXPR_P. */
unsigned decl_flag_2 : 1;
- /* In FIELD_DECL, this is DECL_PADDING_P. */
+ /* In FIELD_DECL, this is DECL_PADDING_P.
+ In VAR_DECL, this is DECL_MERGEABLE. */
unsigned decl_flag_3 : 1;
/* Logically, these two would go in a theoretical base shared by var and
parm decl. */
- unsigned gimple_reg_flag : 1;
+ unsigned not_gimple_reg_flag : 1;
/* In VAR_DECL, PARM_DECL and RESULT_DECL, this is DECL_BY_REFERENCE. */
unsigned decl_by_reference_flag : 1;
/* In a VAR_DECL and PARM_DECL, this is DECL_READ_P. */
unsigned decl_read_flag : 1;
/* In a VAR_DECL or RESULT_DECL, this is DECL_NONSHAREABLE. */
+ /* In a PARM_DECL, this is DECL_HIDDEN_STRING_LENGTH. */
unsigned decl_nonshareable_flag : 1;
/* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */
TYPE_WARN_IF_NOT_ALIGN. */
unsigned int warn_if_not_align : 6;
- /* 14 bits unused. */
+ /* In FIELD_DECL, this is DECL_NOT_FLEXARRAY. */
+ unsigned int decl_not_flexarray : 1;
+
+ /* 5 bits unused. */
/* UID for points-to sets, stable over copying from inlining. */
unsigned int pt_uid;
/* Belong to FUNCTION_DECL exclusively. */
unsigned regdecl_flag : 1;
/* 14 unused bits. */
+ /* 32 more unused on 64 bit HW. */
};
struct GTY(()) tree_var_decl {
tree result;
};
+/* Classify a special function declaration type. */
+
+enum function_decl_type
+{
+ NONE,
+ OPERATOR_NEW,
+ OPERATOR_DELETE,
+ LAMBDA_FUNCTION
+
+ /* 0 values left */
+};
+
/* FUNCTION_DECL inherits from DECL_NON_COMMON because of the use of the
arguments/result/saved_tree fields by front ends. It was either inherit
FUNCTION_DECL from non_common, or inherit non_common from FUNCTION_DECL,
/* Index within a virtual table. */
tree vindex;
- /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
- DECL_FUNCTION_CODE. Otherwise unused.
- ??? The bitfield needs to be able to hold all target function
- codes as well. */
- ENUM_BITFIELD(built_in_function) function_code : 12;
- ENUM_BITFIELD(built_in_class) built_in_class : 2;
+ /* In a FUNCTION_DECL this is DECL_UNCHECKED_FUNCTION_CODE. */
+ unsigned int function_code;
+ ENUM_BITFIELD(built_in_class) built_in_class : 2;
unsigned static_ctor_flag : 1;
unsigned static_dtor_flag : 1;
-
unsigned uninlinable : 1;
unsigned possibly_inlined : 1;
unsigned novops_flag : 1;
unsigned returns_twice_flag : 1;
+
unsigned malloc_flag : 1;
- unsigned operator_new_flag : 1;
unsigned declared_inline_flag : 1;
unsigned no_inline_warning_flag : 1;
-
unsigned no_instrument_function_entry_exit : 1;
unsigned no_limit_stack : 1;
unsigned disregard_inline_limits : 1;
unsigned pure_flag : 1;
unsigned looping_const_or_pure_flag : 1;
+
+ /* Align the bitfield to boundary of a byte. */
+ ENUM_BITFIELD(function_decl_type) decl_type: 2;
unsigned has_debug_args_flag : 1;
unsigned versioned_function : 1;
- unsigned lambda_function: 1;
- /* No bits left. */
+ unsigned replaceable_operator : 1;
+
+ /* 11 bits left for future expansion. */
+ /* 32 bits on 64-bit HW. */
};
struct GTY(()) tree_translation_unit_decl {
struct tree_decl_common common;
/* Source language of this translation unit. Used for DWARF output. */
- const char * GTY((skip(""))) language;
+ const char *language;
/* TODO: Non-optimization used to build this translation unit. */
/* TODO: Root of a partial DWARF tree for global types and decls. */
};
/* Forward declaration, defined in target-globals.h. */
-struct GTY(()) target_globals;
+class GTY(()) target_globals;
/* Target options used by a function. */
struct tree_base base;
/* Target globals for the corresponding target option. */
- struct target_globals *globals;
+ class target_globals *globals;
/* The optimization options used by the user. */
struct cl_target_option *opts;
/* The minimum length of the list of arguments of the attribute. */
int min_length;
/* The maximum length of the list of arguments of the attribute
- (-1 for no maximum). */
+ (-1 for no maximum). It can also be -2 for fake attributes
+ created for the sake of -Wno-attributes; in that case, we
+ should skip the balanced token sequence when parsing the attribute. */
int max_length;
/* Whether this attribute requires a DECL. If it does, it will be passed
from types of DECLs, function return types and array element types to
bool function_type_required;
/* Specifies if attribute affects type's identity. */
bool affects_type_identity;
- /* Function to handle this attribute. NODE points to the node to which
- the attribute is to be applied. If a DECL, it should be modified in
+ /* Function to handle this attribute. NODE points to a tree[3] array,
+ where node[0] is the node to which the attribute is to be applied;
+ node[1] is the last pushed/merged declaration if one exists, and node[2]
+ may be the declaration for node[0]. If a DECL, it should be modified in
place; if a TYPE, a copy should be created. NAME is the canonicalized
name of the attribute i.e. without any leading or trailing underscores.
ARGS is the TREE_LIST of the arguments (which may be NULL). FLAGS gives
extern bool tree_contains_struct[MAX_TREE_CODES][64];
/* Class of tree given its code. */
-extern const enum tree_code_class tree_code_type[];
+#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
+#define END_OF_BASE_TREE_CODES tcc_exceptional,
+
+#if __cpp_inline_variables < 201606L
+template <int N>
+struct tree_code_type_tmpl {
+ static constexpr enum tree_code_class tree_code_type[] = {
+#include "all-tree.def"
+ };
+};
+
+template <int N>
+constexpr enum tree_code_class tree_code_type_tmpl<N>::tree_code_type[];
+#else
+constexpr inline enum tree_code_class tree_code_type[] = {
+#include "all-tree.def"
+};
+#endif
+
+#undef DEFTREECODE
+#undef END_OF_BASE_TREE_CODES
/* Each tree code class has an associated string representation.
These must correspond to the tree_code_class entries. */
extern const char *const tree_code_class_strings[];
/* Number of argument-words in each kind of tree-node. */
-extern const unsigned char tree_code_length[];
+
+#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
+#define END_OF_BASE_TREE_CODES 0,
+
+#if __cpp_inline_variables < 201606L
+template <int N>
+struct tree_code_length_tmpl {
+ static constexpr unsigned char tree_code_length[] = {
+#include "all-tree.def"
+ };
+};
+
+template <int N>
+constexpr unsigned char tree_code_length_tmpl<N>::tree_code_length[];
+#else
+constexpr inline unsigned char tree_code_length[] = {
+#include "all-tree.def"
+};
+#endif
+
+#undef DEFTREECODE
+#undef END_OF_BASE_TREE_CODES
/* Vector of all alias pairs for global symbols. */
extern GTY(()) vec<alias_pair, va_gc> *alias_pairs;
/* Number of operands and names for each OMP_CLAUSE node. */
extern unsigned const char omp_clause_num_ops[];
extern const char * const omp_clause_code_name[];
+extern const char *user_omp_clause_code_name (tree, bool);
/* A vector of all translation-units. */
extern GTY (()) vec<tree, va_gc> *all_translation_units;