gimplify.h (omp_construct_selector_matches): Change return type to int, add a new...
authorJakub Jelinek <jakub@redhat.com>
Sat, 2 Nov 2019 09:02:21 +0000 (10:02 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 2 Nov 2019 09:02:21 +0000 (10:02 +0100)
commitd0c464d27244ba47e66f3e1444354e423304bd12
treebf2a4b0ab2cb56537d82c7caa73be8a0c0ed6173
parent628be4ef7078d5fcbd0096f7b11fb9a24e4da08a
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
14 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.h
gcc/c-family/c-omp.c
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/gimplify.c
gcc/gimplify.h
gcc/omp-general.c
gcc/omp-general.h
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/gomp/declare-variant-12.c [new file with mode: 0644]