public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Michael V. Zolotukhin" <michael.v.zolotukhin@gmail.com>
To: Bernd Schmidt <bernds@codesourcery.com>
Cc: Jakub Jelinek <jakub@redhat.com>,
	Thomas Schwinge <thomas@codesourcery.com>,
	Richard Biener <rguenther@suse.de>,
	Kirill Yukhin <kirill.yukhin@gmail.com>,
	Ilya Verbin <iverbin@gmail.com>,
	Andrey Turetskiy <andrey.turetskiy@gmail.com>,
	Ilya Tocar <tocarip.intel@gmail.com>,
	gcc <gcc-patches@gcc.gnu.org>
Subject: Re: [RFC][gomp4] Offloading patches (3/3): Add invocation of target compiler
Date: Fri, 20 Dec 2013 16:47:00 -0000	[thread overview]
Message-ID: <20131220164647.GC39975@msticlxl57.ims.intel.com> (raw)
In-Reply-To: <52B46228.7070900@codesourcery.com>

> This patch seems to make rather too many assumptions about host and
> target compilers. Certainly code like this can't go into
> target-independent code like lto-wrapper.
That's true.  The point of this patch was to show what is needed to support
x86->MIC OpenMP offloading, as we currently see it.  We are ready to extend
existing code making it more versatile, but keeping this needed functionality.

> Also, I'm not sure you can
> assume you'll get ELF files out of the OpenACC target compiler; I'd very
> prefer a solution that doesn't rely on objcopy.
Yep, that's an issue I suspected but wasn't sure of.

The idea was to prepare an image in the following steps:
  1. Compile with target compiler.
  2. Post-process it (in our case, call objcopy and perform partial linking).
  3. Pass it to the host linker as a usual object file with the image and its
size placed in the known symbols with defined names (e.g.
_omp_<target-name>_image).

I would like to keep step 3 unchanged, while the steps 1 and 2 could be easily
combined into a single one.

In that case we could say that output of a target compiler should be an object
file for host linker with several symbols defined: _omp_<target-name>_image,
_omp_<target-name>_size, etc.

For x86->MIC one would use gcc+objcopy for this, and for OpenACC offloading one
could use gcc+some of other target-specific utils (if any of them needed).

Will this scheme work for OpenACC?

Michael
> Bernd

  reply	other threads:[~2013-12-20 16:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17 11:43 Michael V. Zolotukhin
2013-12-20 15:28 ` Bernd Schmidt
2013-12-20 16:47   ` Michael V. Zolotukhin [this message]
2014-01-16 11:37     ` Michael Zolotukhin

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=20131220164647.GC39975@msticlxl57.ims.intel.com \
    --to=michael.v.zolotukhin@gmail.com \
    --cc=andrey.turetskiy@gmail.com \
    --cc=bernds@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iverbin@gmail.com \
    --cc=jakub@redhat.com \
    --cc=kirill.yukhin@gmail.com \
    --cc=rguenther@suse.de \
    --cc=thomas@codesourcery.com \
    --cc=tocarip.intel@gmail.com \
    /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).