This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ilya Verbin <iverbin at gmail dot com>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, Jan Hubicka <hubicka at ucw dot cz>, Richard Biener <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org, Kirill Yukhin <kirill dot yukhin at gmail dot com>, Ilya Tocar <tocarip at gmail dot com>, Andrey Turetskiy <andrey dot turetskiy at gmail dot com>, Bernd Schmidt <bernds at codesourcery dot com>
- Date: Wed, 8 Oct 2014 11:12:49 +0200
- Subject: Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming
- Authentication-results: sourceware.org; auth=none
- References: <20140927181647 dot GA1819 at msticlxl57 dot ims dot intel dot com> <20140929011014 dot GA11758 at kam dot mff dot cuni dot cz> <20140929173704 dot GA7526 at msticlxl57 dot ims dot intel dot com> <878ul172w5 dot fsf at schwinge dot name> <20141001161332 dot GB54978 at msticlxl57 dot ims dot intel dot com> <20141008084522 dot GS1986 at tucnak dot redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Oct 08, 2014 at 10:45:22AM +0200, Jakub Jelinek wrote:
> And, once there is an option to select which offload targets to generate
> code for (or none), initialize_offload () should supposedly return false
> if the user requested no offloading on the command line.
After some thought, I take this back. We should always stream
.gnu.offload_lto_* if we have any target regions or omp declare target
functions/vars. The decision should be done during linking, if the user
wants only host fallback, during linking we should just throw away those
.gnu.offload_lto_* sections (could also tweak defaults for that e.g.
in libgomp.spec). Thinking with a distro hat now, if gcc is configured
as offloading for say MIC, PTX and HSA?, it would be nice if the default
choice was dependent on which offloading compilers the user decided to actually
install. So one could add a default for
%{!foffloading:-foffloading=x86_64-intelmic-linux-gnu}
if MIC offloading compiler is installed and PTX/HSA is not (for example,
don't remember the name of the option we discussed).
Jakub