This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4] Preserve NVPTX "reconvergence" points
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, <gcc-patches at gcc dot gnu dot org>, Nathan Sidwell <nathan at codesourcery dot com>, Julian Brown <julian at codesourcery dot com>
- Date: Wed, 24 Jun 2015 15:11:04 +0200
- Subject: Re: [gomp4] Preserve NVPTX "reconvergence" points
- Authentication-results: sourceware.org; auth=none
- References: <20150528150635 dot 7bd5db23 at octopus> <20150528142011 dot GN10247 at tucnak dot redhat dot com> <87pp5kg3js dot fsf at schwinge dot name> <20150528150802 dot GO10247 at tucnak dot redhat dot com> <5583E68A dot 9020608 at codesourcery dot com> <20150619122557 dot GO10247 at tucnak dot redhat dot com> <5584132A dot 6080108 at codesourcery dot com> <20150619134529 dot GP10247 at tucnak dot redhat dot com>
On 06/19/2015 03:45 PM, Jakub Jelinek wrote:
If the loop remains in the IL (isn't optimized away as unreachable or
isn't removed, e.g. as a non-loop - say if it contains a noreturn call),
the flags on struct loop should be still there. For the loop clauses
(reduction always, and private/lastprivate if addressable etc.) for
OpenMP simd / Cilk+ simd we use special arrays indexed by internal
functions, which then during vectorization are shrunk (but in theory could
be expanded too) to the right vectorization factor if vectorized, of course
accesses within the loop vectorized using SIMD, and if not vectorized,
shrunk to 1 element.
I'd appreciate if you could describe that mechanism in more detail. As
far as I can tell it is very poorly commented and documented in the
code. I mean, it doesn't even follow the minimal coding standards of
describing function inputs:
/* Helper function of lower_rec_input_clauses, used for #pragma omp simd
privatization. */
static bool
lower_rec_simd_input_clauses (tree new_var, omp_context *ctx, int &max_vf,
tree &idx, tree &lane, tree &ivar, tree &lvar)
Bernd