public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Ilya Verbin <iverbin@gmail.com>,
	Uday Khedker <uday@cse.iitb.ac.in>,
	       hubicka@ucw.cz, rth@redhat.com, kirill.yukhin@gmail.com,
	       "Michael V. Zolotukhin" <michael.v.zolotukhin@gmail.com>,
	       gcc@gcc.gnu.org
Subject: Re: Questions about LTO infrastructure and pragma omp target
Date: Fri, 23 Aug 2013 15:06:00 -0000	[thread overview]
Message-ID: <20130823123638.GL1814@tucnak.redhat.com> (raw)
In-Reply-To: <85e37f42-69fe-4bbf-bf1d-f73194e7c444@email.android.com>

On Fri, Aug 23, 2013 at 02:24:42PM +0200, Richard Biener wrote:
> >As far as I understood, in addition to the bytecode of foo, we should
> >also stream extra symtab_nodes, and read them somewhere in
> >lto-cgraph.c:input_symtab().
> >This means we should maintain 2 symtabs inside WPA stage - original for
> >host and new for target?
> 
> No, as you will refer to the symbol with the target code from the host
> code you need a single unified symtab.

I really think you want two symtabs rather than a unified symtab,
or just stream a subset of the host symtab into the .gnu.target_lto
section.  The thing is, the target code (functions, vars, outlined bodies)
is a strict subset of the host code (because as a fallback, everything
needs to be able to run on the host), but when not compiling originally with
-flto, we IMHO should stream just the target subset, not everything
(and for -flto stream both the target subset into one section and everything
(host code) as we do right now, either with fat or slim lto objects).
I think we shouldn't require that you can use -fopenmp and acceleration only
if you compile host code with -flto.
The target code generally can't call into the host code, and for the other
direction at least for Intel MIC it is done by symbol lookup (you tell COI
library to upload a binary or shared library from file or memory to the
target device and then you tell it to invoke some named function).

	Jakub

  reply	other threads:[~2013-08-23 12:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 13:44 Ilya Verbin
2013-08-15 15:00 ` Jakub Jelinek
2013-08-15 19:19   ` Richard Biener
2013-08-23 13:15     ` Ilya Verbin
2013-08-23 14:38       ` Jakub Jelinek
2013-08-28  9:59         ` Basile Starynkevitch
2013-08-23 15:05       ` Richard Biener
2013-08-23 15:06         ` Jakub Jelinek [this message]
2013-08-25 22:36           ` Ilya Verbin
2013-08-26  7:32             ` Jakub Jelinek
2013-09-03 14:00               ` Michael V. Zolotukhin
2013-09-03 14:19                 ` Jakub Jelinek
2013-09-03 15:18                   ` Michael V. Zolotukhin
2013-09-03 17:39                     ` Thomas Schwinge
2013-09-03 18:30                       ` Michael V. Zolotukhin
2013-09-03 18:54                         ` Jakub Jelinek
2013-09-03 19:09                           ` Michael V. Zolotukhin
2013-09-16 17:14         ` Ilya Verbin
2013-09-17  8:12           ` Richard Biener
2013-09-17 11:31             ` Ilya Verbin
2013-09-17 11:54               ` Jakub Jelinek
2013-09-17 11:56               ` Richard Biener
2013-09-17 12:15                 ` Jakub Jelinek
2013-09-19 10:45                   ` Ilya Verbin
2013-09-19 10:50                     ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130823123638.GL1814@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=iverbin@gmail.com \
    --cc=kirill.yukhin@gmail.com \
    --cc=michael.v.zolotukhin@gmail.com \
    --cc=richard.guenther@gmail.com \
    --cc=rth@redhat.com \
    --cc=uday@cse.iitb.ac.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).