X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gcc%2Ftree-core.h;h=a89f063ab55a748551802092c627c10324354473;hb=4b24d500f4ca5cefbeeca2a6924d1ebdc180b184;hp=ecf732521ab6ad4df0f9729143dcf7c2d37c3bea;hpb=a5544970246db337977bb8b69ab120e9ef209317;p=gcc.git diff --git a/gcc/tree-core.h b/gcc/tree-core.h index ecf732521ab..a89f063ab55 100644 --- a/gcc/tree-core.h +++ b/gcc/tree-core.h @@ -1,5 +1,5 @@ /* Core data structures for the 'tree' type. - Copyright (C) 1989-2019 Free Software Foundation, Inc. + Copyright (C) 1989-2020 Free Software Foundation, Inc. This file is part of GCC. @@ -110,6 +110,10 @@ struct die_struct; /* Nonzero if the argument is not used by the function. */ #define EAF_UNUSED (1 << 3) +/* Nonzero if the argument itself does not escape but memory + referenced by it can escape. */ +#define EAF_NODIRECTESCAPE (1 << 4) + /* Call return flags. */ /* Mask for the argument number that is returned. Lower two bits of the return flags, encodes argument slots zero to three. */ @@ -156,7 +160,7 @@ enum built_in_class { 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) @@ -276,6 +280,9 @@ enum omp_clause_code { /* 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, @@ -306,13 +313,22 @@ enum omp_clause_code { 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). */ + /* 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, + /* Internal structure to hold OpenACC cache directive's variable-list. #pragma acc cache (variable-list). */ OMP_CLAUSE__CACHE_, @@ -343,6 +359,12 @@ enum omp_clause_code { /* 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, @@ -400,6 +422,9 @@ enum omp_clause_code { /* 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, @@ -436,6 +461,12 @@ enum omp_clause_code { /* OpenMP clause: defaultmap (tofrom: scalar). */ OMP_CLAUSE_DEFAULTMAP, + /* OpenMP clause: order (concurrent). */ + OMP_CLAUSE_ORDER, + + /* OpenMP clause: bind (binding). */ + OMP_CLAUSE_BIND, + /* Internally used only clause, holding SIMD uid. */ OMP_CLAUSE__SIMDUID_, @@ -464,10 +495,6 @@ enum omp_clause_code { /* 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, @@ -524,6 +551,12 @@ enum omp_clause_defaultmap_kind { OMP_CLAUSE_DEFAULTMAP_MASK = 7 * (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 { @@ -570,6 +603,7 @@ enum tree_index { TI_UINT16_TYPE, TI_UINT32_TYPE, TI_UINT64_TYPE, + TI_UINT128_TYPE, TI_VOID, @@ -665,9 +699,6 @@ enum tree_index { 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, @@ -742,6 +773,10 @@ enum tree_index { 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, @@ -749,6 +784,9 @@ enum tree_index { TI_CURRENT_TARGET_PRAGMA, TI_CURRENT_OPTIMIZE_PRAGMA, + TI_CHREC_DONT_KNOW, + TI_CHREC_KNOWN, + TI_MAX }; @@ -829,7 +867,10 @@ enum attribute_flags { 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. */ @@ -851,7 +892,8 @@ enum operand_equal_flag { /* 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 }; /* Enum and arrays used for tree allocation stats. @@ -1032,7 +1074,9 @@ struct GTY(()) tree_base { 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; @@ -1142,6 +1186,9 @@ struct GTY(()) tree_base { OMP_CLAUSE_REDUCTION_OMP_ORIG_REF in OMP_CLAUSE_{,TASK_,IN_}REDUCTION + OMP_CLAUSE_USE_DEVICE_PTR_IF_PRESENT in + OMP_CLAUSE_USE_DEVICE_PTR + TRANSACTION_EXPR_RELAXED in TRANSACTION_EXPR @@ -1187,7 +1234,8 @@ struct GTY(()) tree_base { 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 @@ -1436,6 +1484,13 @@ enum omp_clause_proc_bind_kind 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, @@ -1511,9 +1566,8 @@ struct GTY(()) tree_omp_clause { enum omp_clause_linear_kind linear_kind; enum tree_code if_modifier; enum omp_clause_defaultmap_kind defaultmap_kind; - /* The dimension a OMP_CLAUSE__GRIDDIM_ clause of a gridified target - construct describes. */ - unsigned int dimension; + 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 @@ -1563,6 +1617,8 @@ struct GTY(()) tree_type_common { ENUM_BITFIELD(machine_mode) mode : 8; + /* TYPE_STRING_FLAG for INTEGER_TYPE and ARRAY_TYPE. + TYPE_CXX_ODR_P for RECORD_TYPE and UNION_TYPE. */ unsigned string_flag : 1; unsigned lang_flag_0 : 1; unsigned lang_flag_1 : 1; @@ -1582,7 +1638,8 @@ struct GTY(()) tree_type_common { unsigned warn_if_not_align : 6; unsigned typeless_storage : 1; unsigned empty_flag : 1; - unsigned spare : 17; + unsigned indivisible_p : 1; + unsigned spare : 16; alias_set_type alias_set; tree pointer_to; @@ -1661,7 +1718,8 @@ struct GTY(()) tree_decl_common { 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. @@ -1675,12 +1733,13 @@ struct GTY(()) tree_decl_common { 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. */ @@ -1775,6 +1834,7 @@ struct GTY(()) tree_decl_with_vis { /* Belong to FUNCTION_DECL exclusively. */ unsigned regdecl_flag : 1; /* 14 unused bits. */ + /* 32 more unused on 64 bit HW. */ }; struct GTY(()) tree_var_decl { @@ -1787,6 +1847,18 @@ struct GTY(()) tree_decl_non_common { 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, @@ -1811,34 +1883,34 @@ struct GTY(()) tree_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 { @@ -1888,7 +1960,7 @@ struct GTY(()) tree_optimization_option { /* Forward declaration, defined in target-globals.h. */ -struct GTY(()) target_globals; +class GTY(()) target_globals; /* Target options used by a function. */ @@ -1896,7 +1968,7 @@ struct GTY(()) tree_target_option { 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;