http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48869

--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> 
2011-05-04 15:46:47 UTC ---
On Wed, 4 May 2011, jakub at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48869
> 
> Jakub Jelinek <jakub at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |jason at gcc dot gnu.org,
>                    |                            |rguenth at gcc dot gnu.org,
>                    |                            |rth at gcc dot gnu.org
> 
> --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-04 
> 15:31:38 UTC ---
> Broken by:
> http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149750
> i.e. gimplification unit-a-time.  The problem is we won't know until
> gimplification whether some non-POD vars will be firstprivate or not, and when
> gimplification has been postponed so late, instantiate_pending_templates won't
> be called any longer.
> Unfortunately, I think duplicating most of the OpenMP related code from
> gimplify.c to find out implicitly firstprivate vars in task constructs earlier
> would be very hard and huge amount of code duplication, on the other side if 
> we
> wanted to instantiate the missing templates late, we'd have to basically 
> repeat
> the whole do { ... } while (reconsider); loop from
> cp_write_global_declarations from within some langhook (I don't think we can 
> do
> that while in the middle of gimplifying something).
> Richard/Richard/Jason, any ideas?

Can we just always instantiate the templates (always assuming they will be
firstprivate) or are we strictly bound to only instantiate when we
know they will be used?  Thus, how does the OMP spec interact with C++
template instantiation rules?

I don't like the idea of instantiating templates when we started
gimplification ... can we move related analysis to the frontend
somewhere so we know whether things are firstprivate or not there?

Richard.

Reply via email to