diff options
author | Tom de Vries <tom@codesourcery.com> | 2018-03-26 09:45:49 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2018-03-26 09:45:49 +0000 |
commit | 46dbeb4085e4a5492579d06641d0aae25b80b465 (patch) | |
tree | 2e2968f8a5a77268b1d31ec7e2c78a3ac5a6014f /gcc/omp-general.h | |
parent | c2f3aac4541abf92c5a3554f77c58dcb5e68413d (diff) | |
download | gcc-46dbeb4085e4a5492579d06641d0aae25b80b465.zip gcc-46dbeb4085e4a5492579d06641d0aae25b80b465.tar.gz gcc-46dbeb4085e4a5492579d06641d0aae25b80b465.tar.bz2 |
Fix switch conversion in offloading functions
2018-03-26 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/85063
* omp-general.c (offloading_function_p): New function. Factor out
of ...
* omp-offload.c (pass_omp_target_link::gate): ... here.
* omp-general.h (offloading_function_p): Declare.
* tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
with attribute omp declare target for offloading functions.
* testsuite/libgomp.c/switch-conversion-2.c: New test.
* testsuite/libgomp.c/switch-conversion.c: New test.
* testsuite/libgomp.oacc-c-c++-common/switch-conversion-2.c: New test.
* testsuite/libgomp.oacc-c-c++-common/switch-conversion.c: New test.
From-SVN: r258852
Diffstat (limited to 'gcc/omp-general.h')
-rw-r--r-- | gcc/omp-general.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/omp-general.h b/gcc/omp-general.h index 481a885..66f0a33 100644 --- a/gcc/omp-general.h +++ b/gcc/omp-general.h @@ -85,6 +85,7 @@ extern void oacc_replace_fn_attrib (tree fn, tree dims); extern void oacc_set_fn_attrib (tree fn, tree clauses, vec<tree> *args); extern tree oacc_build_routine_dims (tree clauses); extern tree oacc_get_fn_attrib (tree fn); +extern bool offloading_function_p (tree fn); extern int oacc_get_fn_dim_size (tree fn, int axis); extern int oacc_get_ifn_dim_arg (const gimple *stmt); |