This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/5] omp-low: implement SIMT privatization, part 1
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alexander Monakov <amonakov at ispras dot ru>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 Mar 2017 11:31:59 +0100
- Subject: Re: [PATCH 2/5] omp-low: implement SIMT privatization, part 1
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 471E08E22C
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 471E08E22C
- References: <1490197595-31938-1-git-send-email-amonakov@ispras.ru> <1490197595-31938-3-git-send-email-amonakov@ispras.ru>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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,
> simt_dlist.
> (lower_rec_simd_input_clauses): Implement SIMT privatization.
> (lower_rec_input_clauses): Likewise.
> (lower_lastprivate_clauses): Handle SIMT privatization.
Jakub