diff options
author | Alexander Monakov <amonakov@ispras.ru> | 2017-01-20 17:38:18 +0300 |
---|---|---|
committer | Alexander Monakov <amonakov@gcc.gnu.org> | 2017-01-20 17:38:18 +0300 |
commit | 4cea8675697151f7e8c5b30259da9ac0971ab070 (patch) | |
tree | 28137ac51f0fa414324d86543939710c9a791a93 /gcc/omp-expand.c | |
parent | 8b0fb476f24b0cec64502a2c2bed16a0c429f8d2 (diff) | |
download | gcc-4cea8675697151f7e8c5b30259da9ac0971ab070.tar.gz |
omp-offload: use PROP_gimple_lomp_dev
* omp-expand.c (expand_omp_simd): Clear PROP_gimple_lomp_dev regardless
of safelen status.
* omp-offload.c (pass_omp_device_lower::gate): Use PROP_gimple_lomp_dev.
* passes.c (dump_properties): Handle PROP_gimple_lomp_dev.
* tree-inline.c (expand_call_inline): Propagate PROP_gimple_lomp_dev.
From-SVN: r244717
Diffstat (limited to 'gcc/omp-expand.c')
-rw-r--r-- | gcc/omp-expand.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c index 57d9fdea85a..d3891e3175e 100644 --- a/gcc/omp-expand.c +++ b/gcc/omp-expand.c @@ -4590,13 +4590,16 @@ expand_omp_simd (struct omp_region *region, struct omp_for_data *fd) } tree step = fd->loop.step; - bool is_simt = (safelen_int > 1 - && omp_find_clause (gimple_omp_for_clauses (fd->for_stmt), - OMP_CLAUSE__SIMT_)); - tree simt_lane = NULL_TREE, simt_maxlane = NULL_TREE; + bool is_simt = omp_find_clause (gimple_omp_for_clauses (fd->for_stmt), + OMP_CLAUSE__SIMT_); if (is_simt) { cfun->curr_properties &= ~PROP_gimple_lomp_dev; + is_simt = safelen_int > 1; + } + tree simt_lane = NULL_TREE, simt_maxlane = NULL_TREE; + if (is_simt) + { simt_lane = create_tmp_var (unsigned_type_node); gimple *g = gimple_build_call_internal (IFN_GOMP_SIMT_LANE, 0); gimple_call_set_lhs (g, simt_lane); |