This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Questions about LTO infrastructure and pragma omp target
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ilya Verbin <iverbin at gmail dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Uday Khedker <uday at cse dot iitb dot ac dot in>, hubicka at ucw dot cz, rth at redhat dot com, kirill dot yukhin at gmail dot com, "Michael V. Zolotukhin" <michael dot v dot zolotukhin at gmail dot com>, gcc at gcc dot gnu dot org
- Date: Fri, 23 Aug 2013 19:23:47 +0200
- Subject: Re: Questions about LTO infrastructure and pragma omp target
- References: <20130815133639 dot GA42355 at msticlxl57 dot ims dot intel dot com> <20130815134437 dot GB1814 at tucnak dot redhat dot com> <4df844f6-f385-4e63-9413-8ea341992b77 at email dot android dot com> <20130823105527 dot GA6976 at msticlxl57 dot ims dot intel dot com> <85e37f42-69fe-4bbf-bf1d-f73194e7c444 at email dot android dot com> <20130823123638 dot GL1814 at tucnak dot redhat dot com> <20130823171514 dot GB6976 at msticlxl57 dot ims dot intel dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Aug 23, 2013 at 09:15:14PM +0400, Ilya Verbin wrote:
> On 23 Aug 13:17, Jakub Jelinek wrote:
> > I don't think we should stream into more than one target section.
> > There should be just .gnu.target_lto section (or whatever other suitable
> > name) and should stream into it:
> > 1) all functions and variables with "omp declare target" attribute
> > 2) the outlined bodies of #pragma omp target turned into *.ompfn functions
> > 3) all the types, symtab etc. needed for that
>
> Why having one target section is preferable than multiple sections for each
> function body?
Because together with each function you also need to stream everything the
function uses (all referenced vars, types, the symtab, etc.). Plus, do you
really want to compile each function and each variable by a separate gcc
process? Though, looking at what -flto does (I thought it emits one
section), apparently it emits plenty of sections, so probably just do what
normal LTO streaming does, except stream it into .gnu.target_lto* instead
of .gnu.lto* sections.
Jakub