Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2016-02-19 Thread Ilya Verbin
On Fri, Feb 19, 2016 at 20:41:58 +0100, Thomas Schwinge wrote: > Hi! > > On Thu, 2 Oct 2014 19:14:57 +0400, Ilya Verbin wrote: > > With this patch lto-wrapper performs invocation of mkoffload tool for each > > offload target. This tool [...] > > will compile IR from .gnu.offload_lto_* sections i

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2016-02-19 Thread Thomas Schwinge
Hi! On Thu, 2 Oct 2014 19:14:57 +0400, Ilya Verbin wrote: > With this patch lto-wrapper performs invocation of mkoffload tool for each > offload target. This tool [...] > will compile IR from .gnu.offload_lto_* sections into offload > target code and embed the resultant code (offload image) into

Help the offload gcc driver find the right assembler (was: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper)

2015-10-02 Thread Thomas Schwinge
Hi! On Tue, 12 May 2015 19:05:17 +0200, Bernd Schmidt wrote: > > @@ -4266,7 +4266,7 @@ process_command (unsigned int decoded_op > > } > > > > gcc_assert (!IS_ABSOLUTE_PATH (tooldir_base_prefix)); > > - tooldir_prefix2 = concat (tooldir_base_prefix, spec_host_machine, > > + tooldir_pr

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2015-05-12 Thread Bernd Schmidt
On 05/12/2015 06:27 PM, Thomas Schwinge wrote: Patch variant 1: @@ -4266,7 +4266,7 @@ process_command (unsigned int decoded_op } gcc_assert (!IS_ABSOLUTE_PATH (tooldir_base_prefix)); - tooldir_prefix2 = concat (tooldir_base_prefix, spec_host_machine, + tooldir_prefix2 = concat (too

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2015-05-12 Thread Thomas Schwinge
Hi Bernd! One question to you, as the one who has originally written this code (): On Thu, 2 Oct 2014 19:14:57 +0400, Ilya Verbin wrote: > With this patch lto-wrapper performs invocation of mkoffload tool for each > offload target. [...]

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-11-12 Thread Richard Biener
On Thu, 6 Nov 2014, Ilya Verbin wrote: > On 16 Oct 13:22, Jakub Jelinek wrote: > > Can you please extract the configure{,.ac}, langhooks.c and varasm.c > > bits into a separate patch? That is preapproved for trunk right now, that > > isn't dependent on anything else. > > Done. > > > The rest LG

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-11-06 Thread Ilya Verbin
On 16 Oct 13:22, Jakub Jelinek wrote: > Can you please extract the configure{,.ac}, langhooks.c and varasm.c > bits into a separate patch? That is preapproved for trunk right now, that > isn't dependent on anything else. Done. > The rest LGTM, but please run it through LTO review (Richard/Honza)

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-29 Thread Kirill Yukhin
Hello Richard, Jan, On 16 Oct 13:22, Jakub Jelinek wrote: > On Thu, Oct 16, 2014 at 03:17:36PM +0400, Ilya Verbin wrote: > The rest LGTM, but please run it through LTO review (Richard/Honza) too. Ping? -- Thanks, k > > Jakub

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-16 Thread Jakub Jelinek
On Thu, Oct 16, 2014 at 03:17:36PM +0400, Ilya Verbin wrote: > On 15 Oct 16:38, Jakub Jelinek wrote: > > > Done. But it turned out that the gcc_GAS_CHECK_FEATURE from > > > gcc/configure.ac: > > > > > > gcc_GAS_CHECK_FEATURE([.section with e], gcc_cv_as_section_has_e, > > > [2,22,51],, > > >

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-16 Thread Ilya Verbin
On 15 Oct 16:38, Jakub Jelinek wrote: > > Done. But it turned out that the gcc_GAS_CHECK_FEATURE from > > gcc/configure.ac: > > > > gcc_GAS_CHECK_FEATURE([.section with e], gcc_cv_as_section_has_e, > > [2,22,51],, > > [.section foo1,"e" > > .byte 0,0,0,0]) > > > > does not work properly.

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-15 Thread Cary Coutant
> My preference would be to add the | SECTION_EXCLUDE unconditionally, and > instead guard the > if (flags & SECTION_EXCLUDE) > *f++ = 'e'; > in varasm.c (default_elf_asm_named_section). The only other user of > SECTION_EXCLUDE seems to be -gsplit-dwarf right now, Cary, is such a change > ok

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-15 Thread Jakub Jelinek
On Wed, Oct 15, 2014 at 06:18:56PM +0400, Ilya Verbin wrote: > On 14 Oct 11:40, Jakub Jelinek wrote: > > My preference would be to add the | SECTION_EXCLUDE unconditionally, and > > instead guard the > > if (flags & SECTION_EXCLUDE) > > *f++ = 'e'; > > in varasm.c (default_elf_asm_named_secti

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-15 Thread Ilya Verbin
On 14 Oct 11:40, Jakub Jelinek wrote: > My preference would be to add the | SECTION_EXCLUDE unconditionally, and > instead guard the > if (flags & SECTION_EXCLUDE) > *f++ = 'e'; > in varasm.c (default_elf_asm_named_section). The only other user of > SECTION_EXCLUDE seems to be -gsplit-dwarf

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-14 Thread Jakub Jelinek
On Tue, Oct 14, 2014 at 02:42:47AM +0400, Ilya Verbin wrote: > > For that I guess > > lhd_begin_section > > would need to replace: > > section = get_section (name, SECTION_DEBUG, NULL); > > with: > > section = get_section (name, SECTION_DEBUG | SECTION_EXCLUDE, NULL); > > either just for the .g

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-13 Thread Ilya Verbin
On 10 Oct 19:00, Jakub Jelinek wrote: > On Fri, Oct 10, 2014 at 09:51:02AM -0700, Cary Coutant wrote: > > The linker already has a --strip-lto-sections option, and it's on by > > default. I'll approve a patch that modifies gold to recognize > > .gnu.offload_lto.* sections as part of --strip-lto-sec

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-10 Thread Cary Coutant
> The question is what will old assemblers and/or linkers do with that, and > if there are any that support linker plugins, but not SHF_EXCLUDE. If it helps answer that question, SHF_EXCLUDE support has been in gold for 6 years, and in gas for 4. -cary

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-10 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 09:51:02AM -0700, Cary Coutant wrote: > The linker already has a --strip-lto-sections option, and it's on by > default. I'll approve a patch that modifies gold to recognize > .gnu.offload_lto.* sections as part of --strip-lto-sections. > > Really, though, you should be sett

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-10 Thread Cary Coutant
The linker already has a --strip-lto-sections option, and it's on by default. I'll approve a patch that modifies gold to recognize .gnu.offload_lto.* sections as part of --strip-lto-sections. Really, though, you should be setting the SHF_EXCLUDE bit on these sections. Do that and no special-casing

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-09 Thread Jakub Jelinek
On Fri, Oct 10, 2014 at 12:07:03AM +0400, Ilya Verbin wrote: > On 09 Oct 16:07, Ilya Verbin wrote: > > > > + /* By default linker does not discard .gnu.offload_lto_* > > > > sections. */ > > > > + const char *linker_script = make_temp_file ("_linker_script.x"); > > > > + FILE *stre

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-09 Thread Ilya Verbin
On 09 Oct 16:07, Ilya Verbin wrote: > > > + /* By default linker does not discard .gnu.offload_lto_* sections. > > > */ > > > + const char *linker_script = make_temp_file ("_linker_script.x"); > > > + FILE *stream = fopen (linker_script, "w"); > > > + if (!stream) > > > + fata

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-09 Thread Bernd Schmidt
On 10/09/2014 02:07 PM, Ilya Verbin wrote: +#ifndef ACCEL_COMPILER /* We need to check standard_exec_prefix/just_machine_suffix/specs for any override of as, ld and libraries. */ specs_file = (char *) alloca (strlen (standard_exec_prefix) + strlen (just_mach

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-09 Thread Ilya Verbin
On 08 Oct 12:26, Jakub Jelinek wrote: > On Thu, Oct 02, 2014 at 07:14:57PM +0400, Ilya Verbin wrote: > > @@ -1296,6 +1297,9 @@ static const char *const standard_startfile_prefix_2 > > relative to the driver. */ > > static const char *const tooldir_base_prefix = TOOLDIR_BASE_PREFIX; > > > >

Re: [PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-08 Thread Jakub Jelinek
On Thu, Oct 02, 2014 at 07:14:57PM +0400, Ilya Verbin wrote: > @@ -1296,6 +1297,9 @@ static const char *const standard_startfile_prefix_2 > relative to the driver. */ > static const char *const tooldir_base_prefix = TOOLDIR_BASE_PREFIX; > > +/* A prefix to be used when this is an accelerato

[PATCH 4/n] OpenMP 4.0 offloading infrastructure: lto-wrapper

2014-10-02 Thread Ilya Verbin
Hello, With this patch lto-wrapper performs invocation of mkoffload tool for each offload target. This tool should be provided by the corresponding offload compiler. It will compile IR from .gnu.offload_lto_* sections into offload target code and embed the resultant code (offload image) into the