diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-11-22 18:56:43 +0100 |
---|---|---|
committer | Alexander Monakov <amonakov@gcc.gnu.org> | 2016-11-22 20:56:43 +0300 |
commit | 6c7509bc070b29293ca9874518b89227ce05361c (patch) | |
tree | ad30078ae6fda7ac5d0a41f3cf4bd216096ef5ac /gcc/tree.c | |
parent | ad4a77a11c929706b8f206443c2b0504edee549f (diff) | |
download | gcc-6c7509bc070b29293ca9874518b89227ce05361c.zip gcc-6c7509bc070b29293ca9874518b89227ce05361c.tar.gz gcc-6c7509bc070b29293ca9874518b89227ce05361c.tar.bz2 |
OpenMP loop cloning for SIMT execution
2016-11-22 Jakub Jelinek <jakub@redhat.com>
Alexander Monakov <amonakov@ispras.ru>
* internal-fn.c (expand_GOMP_USE_SIMT): New function.
* tree.c (omp_clause_num_ops): OMP_CLAUSE__SIMT_ has 0 operands.
(omp_clause_code_name): Add _simt_ name.
(walk_tree_1): Handle OMP_CLAUSE__SIMT_.
* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__SIMT_.
* omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE__SIMT_.
(scan_omp_simd): New function.
(scan_omp_1_stmt): Use it in target regions if needed.
(omp_max_vf): Don't max with omp_max_simt_vf.
(lower_rec_simd_input_clauses): Use omp_max_simt_vf if
OMP_CLAUSE__SIMT_ is present.
(lower_rec_input_clauses): Compute maybe_simt from presence of
OMP_CLAUSE__SIMT_.
(lower_lastprivate_clauses): Likewise.
(expand_omp_simd): Likewise.
(execute_omp_device_lower): Lower IFN_GOMP_USE_SIMT.
* internal-fn.def (GOMP_USE_SIMT): New internal function.
* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__SIMT_.
Co-Authored-By: Alexander Monakov <amonakov@ispras.ru>
From-SVN: r242714
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -320,6 +320,7 @@ unsigned const char omp_clause_num_ops[] = 1, /* OMP_CLAUSE_HINT */ 0, /* OMP_CLAUSE_DEFALTMAP */ 1, /* OMP_CLAUSE__SIMDUID_ */ + 0, /* OMP_CLAUSE__SIMT_ */ 1, /* OMP_CLAUSE__CILK_FOR_COUNT_ */ 0, /* OMP_CLAUSE_INDEPENDENT */ 1, /* OMP_CLAUSE_WORKER */ @@ -391,6 +392,7 @@ const char * const omp_clause_code_name[] = "hint", "defaultmap", "_simduid_", + "_simt_", "_Cilk_for_count_", "independent", "worker", @@ -11893,6 +11895,7 @@ walk_tree_1 (tree *tp, walk_tree_fn func, void *data, case OMP_CLAUSE_AUTO: case OMP_CLAUSE_SEQ: case OMP_CLAUSE_TILE: + case OMP_CLAUSE__SIMT_: WALK_SUBTREE_TAIL (OMP_CLAUSE_CHAIN (*tp)); case OMP_CLAUSE_LASTPRIVATE: |