OpenMP offloading to NVPTX: middle-end changes
authorAlexander Monakov <amonakov@ispras.ru>
Tue, 22 Nov 2016 16:57:29 +0000 (19:57 +0300)
committerAlexander Monakov <amonakov@gcc.gnu.org>
Tue, 22 Nov 2016 16:57:29 +0000 (19:57 +0300)
commit9669b00bfb16ced0d5bf09b9e016e9ffa8be4219
tree36fcb281bf349333f6b5a61f5076bda2cef9590a
parent9435cd52b3180e6171c0f738fe7e8ffd79dd9b28
OpenMP offloading to NVPTX: middle-end changes

* internal-fn.c (expand_GOMP_SIMT_LANE): New.
(expand_GOMP_SIMT_VF): New.
(expand_GOMP_SIMT_LAST_LANE): New.
(expand_GOMP_SIMT_ORDERED_PRED): New.
(expand_GOMP_SIMT_VOTE_ANY): New.
(expand_GOMP_SIMT_XCHG_BFLY): New.
(expand_GOMP_SIMT_XCHG_IDX): New.
* internal-fn.def (GOMP_SIMT_LANE): New.
(GOMP_SIMT_VF): New.
(GOMP_SIMT_LAST_LANE): New.
(GOMP_SIMT_ORDERED_PRED): New.
(GOMP_SIMT_VOTE_ANY): New.
(GOMP_SIMT_XCHG_BFLY): New.
(GOMP_SIMT_XCHG_IDX): New.
* omp-low.c (omp_maybe_offloaded_ctx): New, outlined from...
(create_omp_child_function): ...here.  Set "omp target entrypoint"
or "omp declare target" attribute based on is_gimple_omp_offloaded.
(omp_max_simt_vf): New.  Use it...
(omp_max_vf): ...here.
(lower_rec_input_clauses): Add reduction lowering for SIMT execution.
(lower_lastprivate_clauses): Likewise, for "lastprivate" lowering.
(lower_omp_ordered): Likewise, for "ordered" lowering.
(expand_omp_simd): Add SIMT transforms.
(pass_data_lower_omp): Add PROP_gimple_lomp_dev.
(execute_omp_device_lower): New.
(pass_data_omp_device_lower): New.
(pass_omp_device_lower): New pass.
(make_pass_omp_device_lower): New.
* passes.def (pass_omp_device_lower): Position new pass.
* tree-pass.h (PROP_gimple_lomp_dev): Define.
(make_pass_omp_device_lower): Declare.

From-SVN: r242710
gcc/ChangeLog
gcc/internal-fn.c
gcc/internal-fn.def
gcc/omp-low.c
gcc/passes.def
gcc/tree-pass.h