[PATCH 2/5] omp-low: implement SIMT privatization, part 1
Thu Mar 23 10:32:00 GMT 2017
On Wed, Mar 22, 2017 at 06:46:32PM +0300, Alexander Monakov wrote:
> This patch adjusts privatization in OpenMP SIMD loops lowered for SIMT targets.
> At lowering time, private variables receive "omp simt private" attribute, get
> mentioned in argument list of GOMP_SIMT_ENTER function, and get a clobbering
> assignment just prior to GOMP_SIMT_EXIT function.
> The following patch will implement the second step: privatized variables are
> converted to fields of a struct allocated by a call to GOMP_SIMT_ENTER_ALLOC.
> This function is similar to __builtin_alloca_with_align, except that it
> obtains per-SIMT-lane storage and implicitly performs target-specific actions;
> on NVPTX that means a transition to per-lane softstacks and inverting the
> uniform-simt mask.
Ok for trunk (if all the other patches are acked).
> * internal-fn.c (expand_GOMP_SIMT_ENTER): New.
> (expand_GOMP_SIMT_ENTER_ALLOC): New.
> (expand_GOMP_SIMT_EXIT): New.
> * internal-fn.def (GOMP_SIMT_ENTER): New internal function.
> (GOMP_SIMT_ENTER_ALLOC): Ditto.
> (GOMP_SIMT_EXIT): Ditto.
> * target-insns.def (omp_simt_enter): New insn.
> (omp_simt_exit): Ditto.
> * omp-low.c (struct omplow_simd_context): New fields simt_eargs,
> (lower_rec_simd_input_clauses): Implement SIMT privatization.
> (lower_rec_input_clauses): Likewise.
> (lower_lastprivate_clauses): Handle SIMT privatization.
More information about the Gcc-patches