diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-11-17 10:07:25 -0800 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-11-17 13:28:07 -0800 |
commit | 066c89d1e1c509975a0e76be4279e2505084bd3b (patch) | |
tree | 53bd1a7f460efcd0b1147ff5c5fc7067bdfb14c5 | |
parent | c49f56adcb2fcfbf3bcf6e1a088bc5dd702f266e (diff) | |
download | gcc-066c89d1e1c509975a0e76be4279e2505084bd3b.zip gcc-066c89d1e1c509975a0e76be4279e2505084bd3b.tar.gz gcc-066c89d1e1c509975a0e76be4279e2505084bd3b.tar.bz2 |
global trees
This reorders the common and c++ global tree arrays. It introduces a
module-specific High Water Mark, below which are the immutable slots
initialized at startup and beyond which are the lazily filled slots
(and a few immutables we need to locate by name lookup anyway).
gcc/c-family/
* c-common.h (enum c_tree_index): Reorder to place lazy fields
after newly-added CTI_MODULE_HWM.
gcc/cp/
* cp-tree.h (enum cp_tree_index): Reorder to place lazy fields
after newly-added CPTI_MODULE_HWM.
-rw-r--r-- | gcc/c-family/c-common.h | 8 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 31 |
2 files changed, 26 insertions, 13 deletions
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 3c50897..f413e87 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -364,13 +364,17 @@ enum c_tree_index CTI_DEFAULT_FUNCTION_TYPE, + CTI_NULL, + /* These are not types, but we have to look them up all the time. */ CTI_FUNCTION_NAME_DECL, CTI_PRETTY_FUNCTION_NAME_DECL, CTI_C99_FUNCTION_NAME_DECL, - CTI_SAVED_FUNCTION_NAME_DECLS, - CTI_NULL, + CTI_MODULE_HWM, + /* Below here entities change during compilation. */ + + CTI_SAVED_FUNCTION_NAME_DECLS, CTI_MAX }; diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 9ae6ff5..81485de 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -128,12 +128,8 @@ enum cp_tree_index CPTI_EXPLICIT_VOID_LIST, CPTI_VTBL_TYPE, CPTI_VTBL_PTR_TYPE, - CPTI_STD, - CPTI_ABI, CPTI_GLOBAL, CPTI_GLOBAL_TYPE, - CPTI_CONST_TYPE_INFO_TYPE, - CPTI_TYPE_INFO_PTR_TYPE, CPTI_ABORT_FNDECL, CPTI_AGGR_TAG, CPTI_CONV_OP_MARKER, @@ -190,8 +186,28 @@ enum cp_tree_index CPTI_NOEXCEPT_FALSE_SPEC, CPTI_NOEXCEPT_DEFERRED_SPEC, + CPTI_NULLPTR, + CPTI_NULLPTR_TYPE, + + CPTI_ANY_TARG, + + CPTI_MODULE_HWM, + /* Nodes after here change during compilation, or should not be in + the module's global tree table. */ + + /* We must find these via the global namespace. */ + CPTI_STD, + CPTI_ABI, + + /* These are created at init time, but the library/headers provide + definitions. */ + CPTI_ALIGN_TYPE, + CPTI_CONST_TYPE_INFO_TYPE, + CPTI_TYPE_INFO_PTR_TYPE, CPTI_TERMINATE_FN, CPTI_CALL_UNEXPECTED_FN, + + /* These are lazily inited. */ CPTI_GET_EXCEPTION_PTR_FN, CPTI_BEGIN_CATCH_FN, CPTI_END_CATCH_FN, @@ -204,13 +220,6 @@ enum cp_tree_index CPTI_DSO_HANDLE, CPTI_DCAST, - CPTI_NULLPTR, - CPTI_NULLPTR_TYPE, - - CPTI_ALIGN_TYPE, - - CPTI_ANY_TARG, - CPTI_SOURCE_LOCATION_IMPL, CPTI_FALLBACK_DFLOAT32_TYPE, |