This is the mail archive of the gcc-patches@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]

Re: RFC (gimplify, openmp): PATCH to is_gimple_reg to check DECL_HAS_VALUE_EXPR_P


On Mon, Jun 13, 2016 at 11:03:54AM +0200, Richard Biener wrote:
> > I'm afraid that would break OpenMP badly.
> > During gimplification, outside of OpenMP contexts we always replace decls
> > for their DECL_VALUE_EXPR, but inside of OpenMP contexts we do it only for
> > some decls.  In particular, omp_notice_variable returns whether the
> > DECL_VALUE_EXPR should be temporarily ignored (if it returns true) or not.
> > If DECL_VALUE_EXPR is temporarily ignored, it is only for a short time,
> > in particular until the omplower pass, which makes sure that the right thing
> > is done with it and everything is regimplified.
> 
> Ugh :/  Feels like OMP lowering should happen during gimplification then.

That is not really possible.  OMP lowering relies on all the OpenMP clauses
(including implicitly added) to be finalized before it can figure out what
to do.  And to have the OpenMP clauses finalized, you need to gimplify
everything.  So, it is impossible to do it at the same time as
gimplification, it needs to be another pass (whether a separate full pass,
or a "subpass" of the gimplification matters less; though for debugging,
dumps, etc. having it a separate full pass is better; in any case, it needs
another processing of the whole IL, and for the is_gimple_reg case doesn't
change anything, we still need to postpone the DECL_VALUE_EXPR processing
of some decls in certain uses till the second pass or subpass).

	Jakub


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