aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.cc
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2023-11-19 00:56:47 +0000
committerSandra Loosemore <sandra@codesourcery.com>2023-12-19 20:06:58 +0000
commit82b32adaa7f9cf3be71a9d41d80570b9efb4c2f0 (patch)
treec22f35d46cbdd0c04ed059cd84afd7d08593668d /gcc/gimplify.cc
parent1502d724df85163b14b04e8f67072ca88eac411d (diff)
downloadgcc-82b32adaa7f9cf3be71a9d41d80570b9efb4c2f0.zip
gcc-82b32adaa7f9cf3be71a9d41d80570b9efb4c2f0.tar.gz
gcc-82b32adaa7f9cf3be71a9d41d80570b9efb4c2f0.tar.bz2
OpenMP: Introduce accessor macros and constructors for context selectors.
This patch hides the underlying nested TREE_LIST structure of context selectors behind accessor macros that have more meaningful names than the generic TREE_PURPOSE/TREE_VALUE accessors. There is a slight change to the representation in that the score expression in trait-selectors has a distinguished tag and is separated from the ordinary properties, although internally it is still represented as the first item in the TREE_VALUE of the selector. This patch also renames some local variables with slightly more descriptive names so it is easier to track whether something is a selector-set, selector, or property. gcc/ChangeLog * omp-general.h (OMP_TS_SCORE_NODE): New. (OMP_TSS_ID, OMP_TSS_TRAIT_SELECTORS): New. (OMP_TS_ID, OMP_TS_SCORE, OMP_TS_PROPERTIES): New. (OMP_TP_NAME, OMP_TP_VALUE): New. (make_trait_set_selector): Declare. (make_trait_selector): Declare. (make_trait_property): Declare. (omp_constructor_traits_to_codes): Rename to omp_construct_traits_to_codes. * omp-general.cc (omp_constructor_traits_to_codes): Rename to omp_construct_traits_to_codes. Use new accessors. (omp_check_context_selector): Use new accessors. (make_trait_set_selector): New. (make_trait_selector): New. (make_trait_property): New. (omp_context_name_list_prop): Use new accessors. (omp_context_selector_matches): Use new accessors. (omp_context_selector_props_compare): Use new accessors. (omp_context_selector_set_compare): Use new accessors. (omp_get_context_selector): Use new accessors. (omp_context_compute_score): Use new accessors. * gimplify.cc (omp_construct_selector_matches): Adjust for renaming of omp_constructor_traits_to_codes. gcc/c/ChangeLog * c-parser.cc (c_parser_omp_context_selector): Use new constructors. gcc/cp/ChangeLog * parser.cc (cp_parser_omp_context_selector): Use new constructors. * pt.cc: Include omp-general.h. (tsubst_attribute): Use new context selector accessors and constructors. gcc/fortran/ChangeLog * trans-openmp.cc (gfc_trans_omp_declare_variant): Use new constructors.
Diffstat (limited to 'gcc/gimplify.cc')
-rw-r--r--gcc/gimplify.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc
index a6bdcea..f61c8ae 100644
--- a/gcc/gimplify.cc
+++ b/gcc/gimplify.cc
@@ -14484,8 +14484,8 @@ omp_construct_selector_matches (enum tree_code *constructs, int nconstructs,
int variant_nconstructs = 0;
if (!target_seen)
variant_nconstructs
- = omp_constructor_traits_to_codes (TREE_VALUE (attr),
- variant_constructs);
+ = omp_construct_traits_to_codes (TREE_VALUE (attr),
+ variant_constructs);
for (int i = 0; i < variant_nconstructs; i++)
{
++cnt;