aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-omp.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-11-02 10:02:21 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-11-02 10:02:21 +0100
commitd0c464d27244ba47e66f3e1444354e423304bd12 (patch)
treebf2a4b0ab2cb56537d82c7caa73be8a0c0ed6173 /gcc/c-family/c-omp.c
parent628be4ef7078d5fcbd0096f7b11fb9a24e4da08a (diff)
downloadgcc-d0c464d27244ba47e66f3e1444354e423304bd12.zip
gcc-d0c464d27244ba47e66f3e1444354e423304bd12.tar.gz
gcc-d0c464d27244ba47e66f3e1444354e423304bd12.tar.bz2
gimplify.h (omp_construct_selector_matches): Change return type to int, add a new SCORES argument.
* gimplify.h (omp_construct_selector_matches): Change return type to int, add a new SCORES argument. * gimplify.c (omp_construct_selector_matches): Likewise. If SCORES is non-NULL, compute scores of each construct. * omp-general.h (omp_get_context_selector): Declare. * omp-general.c (omp_maybe_offloaded, omp_context_selector_matches): Adjust omp_construct_selector_matches callers. (omp_get_context_selector): New function, moved from c-family/c-omp.c. (omp_context_compute_score): New function. (omp_resolve_declare_variant): Compute scores and decide based on that. c-family/ * c-common.h (c_omp_get_context_selector): Remove. * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c and renamed to omp_get_context_selector. c/ * c-parser.c (c_finish_omp_declare_variant): Use omp_get_context_selector instead of c_omp_get_context_selector. cp/ * decl.c (omp_declare_variant_finalize_one): Use omp_get_context_selector instead of c_omp_get_context_selector. testsuite/ * c-c++-common/gomp/declare-variant-12.c: New test. From-SVN: r277742
Diffstat (limited to 'gcc/c-family/c-omp.c')
-rw-r--r--gcc/c-family/c-omp.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c
index fdf778f..e53461d 100644
--- a/gcc/c-family/c-omp.c
+++ b/gcc/c-family/c-omp.c
@@ -2237,27 +2237,6 @@ c_omp_check_context_selector (location_t loc, tree ctx)
return ctx;
}
-/* From context selector CTX, return trait-selector with name SEL in
- trait-selector-set with name SET if any, or NULL_TREE if not found.
- If SEL is NULL, return the list of trait-selectors in SET. */
-
-tree
-c_omp_get_context_selector (tree ctx, const char *set, const char *sel)
-{
- tree setid = get_identifier (set);
- tree selid = sel ? get_identifier (sel) : NULL_TREE;
- for (tree t1 = ctx; t1; t1 = TREE_CHAIN (t1))
- if (TREE_PURPOSE (t1) == setid)
- {
- if (sel == NULL)
- return TREE_VALUE (t1);
- for (tree t2 = TREE_VALUE (t1); t2; t2 = TREE_CHAIN (t2))
- if (TREE_PURPOSE (t2) == selid)
- return t2;
- }
- return NULL_TREE;
-}
-
/* Register VARIANT as variant of some base function marked with
#pragma omp declare variant. CONSTRUCT is corresponding construct
selector set. */