diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-11-15 09:32:36 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-11-15 09:32:36 +0100 |
commit | 0227ffa98e122d5716d508c435cb8323cd93bfef (patch) | |
tree | 1061bae3610fd33b8be8ea3ae45c260c201f3812 /gcc/gimplify.c | |
parent | 1c9676e2076b403eb1f6b22351bf0c58cc367ee3 (diff) | |
download | gcc-0227ffa98e122d5716d508c435cb8323cd93bfef.zip gcc-0227ffa98e122d5716d508c435cb8323cd93bfef.tar.gz gcc-0227ffa98e122d5716d508c435cb8323cd93bfef.tar.bz2 |
gimplify.c (gimplify_call_expr): Don't call omp_resolve_declare_variant after gimplification.
* gimplify.c (gimplify_call_expr): Don't call
omp_resolve_declare_variant after gimplification.
* omp-general.c (omp_context_selector_matches): For isa that might
match in some other function, defer if in declare simd function.
(omp_context_compute_score): Don't look for " score" in construct
trait set. Set *score to -1 if it can't ever match.
(omp_resolve_declare_variant): If any variants need to be deferred,
don't punt immediately, but compute scores of all variants and if
ther eis a score winner that doesn't need to be deferred, return that.
* c-c++-common/gomp/declare-variant-13.c: New test.
From-SVN: r278280
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 87a6405..0bbd475 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -3391,7 +3391,10 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value) /* Remember the original function pointer type. */ fnptrtype = TREE_TYPE (CALL_EXPR_FN (*expr_p)); - if (flag_openmp && fndecl) + if (flag_openmp + && fndecl + && cfun + && (cfun->curr_properties & PROP_gimple_any) == 0) { tree variant = omp_resolve_declare_variant (fndecl); if (variant != fndecl) |