This is the mail archive of the
mailing list for the GCC project.
Re: [patch,openacc] Propagate independent clause for OpenACC kernels pass
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Julian Brown <julian at codesourcery dot com>, Richard Biener <rguenther at suse dot de>
- Cc: Cesar Philippidis <cesar at codesourcery dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Chung-Lin Tang <cltang at codesourcery dot com>
- Date: Tue, 4 Dec 2018 14:45:26 +0100
- Subject: Re: [patch,openacc] Propagate independent clause for OpenACC kernels pass
- References: <email@example.com> <firstname.lastname@example.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Dec 03, 2018 at 11:40:39PM +0000, Julian Brown wrote:
> Jakub asked in the following email at the time of the patch submission
> for the gomp4 branch what the difference was between the new
> marked_independent flag and safelen == INT_MAX:
> If I understand the followup correctly,
> a setting of safelen > 1 means that up to that number of loop
> iterations can run together in lockstep (as if each insn in the loop
> was blindly rewritten to a safelen-width SIMD equivalent) -- but
> anything that happens in iteration N + 1 cannot happen before something
> that happens in iteration N. Chung-Lin pointed out that OpenACC's
> semantics are even less strict (allowing iterations to proceed fully
> independently in an arbitrary order), so the marked_independent flag
> does carry non-redundant information -- even with safelen set to
OpenMP 5 (not implemented in GCC 9 though) has order(concurrent) clause
for this (no cross-iteration dependencies at all, iterations can be run in
any order, in parallel etc.).
I believe it matches the can_be_parallel flag we now have, but I remember
there were some issues with that flag for use in DO CONCURRENT.
Or do we want to have some other flag for really independent iterations?
What passes could use that? Would the vectorizer appreciate the stronger
assertion in some cases?