This is the mail archive of the gcc@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: Questions about LTO infrastructure and pragma omp target


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


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