This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/83064] [8 Regression] DO CONCURRENT inconsistent results


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83064

--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #19)
> (In reply to Thomas Koenig from comment #15)
> > Do I understand correctly that creating all compiler-generated
> > temporary variables inside a block in DO CONCURRENT would solve the
> > problem?
> > 
> > If so, it might be doable.
> 
> If those temporaries aren't needed across iterations and different
> iterations shouldn't share the same temporary, then sure, put the
> temporaries into a BLOCK inside of the DO CONCURRENT.

Though, you are already doing that from what I can see.
Does autopar break this (i.e. create the loop) even without the ANNOTATE, or
does it give up on the analysis?  If the latter, then either parloops still
needs to perform some analysis even if can_be_parallel and detect that it can
parallelize iff it makes these and these variables private rather than shared
and needs some reliable way how to identify the loop local variables (that
isn't just the temporaries inside of the BLOCKs inside of the loop, but after
inlining also any temporaries in whatever has been inlined into it).
Or, alternatively, disable the can_be_parallel on the loop if we detect such
local variables inside of the loop (that would need to be done not just when we
still have high gimple and can prove it early (we care about addressable vars
only, right?), but also during inlining into bodies of can_be_parallel loops.
Or just for now never set or query can_be_parallel and defer it to GCC 9.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]