Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2015-08-05 Thread Ilya Verbin
On Wed, Aug 05, 2015 at 10:40:44 +0200, Richard Biener wrote: > On Fri, Jul 31, 2015 at 4:20 PM, Ilya Verbin wrote: > > On Fri, Jul 31, 2015 at 16:08:27 +0200, Thomas Schwinge wrote: > >> We had established the use of a boolean flag have_offload in gcc::context > >> to indicate whether during comp

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2015-08-05 Thread Richard Biener
On Fri, Jul 31, 2015 at 4:20 PM, Ilya Verbin wrote: > On Fri, Jul 31, 2015 at 16:08:27 +0200, Thomas Schwinge wrote: >> We had established the use of a boolean flag have_offload in gcc::context >> to indicate whether during compilation, we've actually seen any code to >> be offloaded (see cited be

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2015-07-31 Thread Ilya Verbin
On Fri, Jul 31, 2015 at 16:08:27 +0200, Thomas Schwinge wrote: > We had established the use of a boolean flag have_offload in gcc::context > to indicate whether during compilation, we've actually seen any code to > be offloaded (see cited below the relevant parts of the patch by Ilya et > al.). Th

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2015-07-31 Thread Thomas Schwinge
Hi! We had established the use of a boolean flag have_offload in gcc::context to indicate whether during compilation, we've actually seen any code to be offloaded (see cited below the relevant parts of the patch by Ilya et al.). This means that currently, the whole offload machinery will not be r

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-11-13 Thread Richard Biener
On Wed, 12 Nov 2014, Ilya Verbin wrote: > On 12 Nov 15:34, Richard Biener wrote: > > > > Seems like Vlad introduced the conflicting type with > > > Okay, we're going to test our changes with patch in the bottom applied > > > both to kyukhin/gomp4-offload and trunk. > > > > > > * gcc/lra-live

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-11-12 Thread Ilya Verbin
On 12 Nov 15:34, Richard Biener wrote: > > > Seems like Vlad introduced the conflicting type with > > Okay, we're going to test our changes with patch in the bottom applied > > both to kyukhin/gomp4-offload and trunk. > > > > * gcc/lra-lives.c (struct bb_data): Rename to ... > > (struct

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-11-12 Thread Richard Biener
On Wed, 12 Nov 2014, Kirill Yukhin wrote: > On 12 Nov 15:09, Richard Biener wrote: > > On Wed, 12 Nov 2014, Kirill Yukhin wrote: > > > > > Hello Richard, > > > On 12 Nov 10:23, Richard Biener wrote: > > > > On Wed, 5 Nov 2014, Ilya Verbin wrote: > > > > Yes please. > > > > > > > > Please make su

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-11-12 Thread Kirill Yukhin
On 12 Nov 15:09, Richard Biener wrote: > On Wed, 12 Nov 2014, Kirill Yukhin wrote: > > > Hello Richard, > > On 12 Nov 10:23, Richard Biener wrote: > > > On Wed, 5 Nov 2014, Ilya Verbin wrote: > > > Yes please. > > > > > > Please make sure that regular LTO bootstrap still works - LTO is > > > only

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-11-12 Thread Richard Biener
On Wed, 12 Nov 2014, Kirill Yukhin wrote: > Hello Richard, > On 12 Nov 10:23, Richard Biener wrote: > > On Wed, 5 Nov 2014, Ilya Verbin wrote: > > Yes please. > > > > Please make sure that regular LTO bootstrap still works - LTO is > > only tested lightly in the testsuite. > > Current main trunk

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-11-12 Thread Kirill Yukhin
Hello Richard, On 12 Nov 10:23, Richard Biener wrote: > On Wed, 5 Nov 2014, Ilya Verbin wrote: > Yes please. > > Please make sure that regular LTO bootstrap still works - LTO is > only tested lightly in the testsuite. Current main trunk fails to bootstrap w/ `bootstrap-lto': git/gcc/configure --e

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-11-12 Thread Richard Biener
On Wed, 5 Nov 2014, Ilya Verbin wrote: > On 03 Nov 10:24, Jakub Jelinek wrote: > > On Tue, Oct 28, 2014 at 10:30:47PM +0300, Ilya Verbin wrote: > > > @@ -474,6 +475,13 @@ cgraph_node::create (tree decl) > > >gcc_assert (TREE_CODE (decl) == FUNCTION_DECL); > > > > > >node->decl = decl; >

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-11-07 Thread Kirill Yukhin
Hello Richard, On 05 Nov 13:50, Jakub Jelinek wrote: > On Wed, Nov 05, 2014 at 03:46:55PM +0300, Ilya Verbin wrote: > > + > >node->register_symbol (); > > LGTM. Are you ok with the patch? > > Jakub -- Thanks, K

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-11-05 Thread Jakub Jelinek
On Wed, Nov 05, 2014 at 03:46:55PM +0300, Ilya Verbin wrote: > Maybe also with this change? > > diff --git a/gcc/omp-low.c b/gcc/omp-low.c > index 4e9ed25..beae5b5 100644 > --- a/gcc/omp-low.c > +++ b/gcc/omp-low.c > @@ -1653,8 +1653,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) >

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-11-05 Thread Ilya Verbin
On 03 Nov 10:24, Jakub Jelinek wrote: > On Tue, Oct 28, 2014 at 10:30:47PM +0300, Ilya Verbin wrote: > > @@ -474,6 +475,13 @@ cgraph_node::create (tree decl) > >gcc_assert (TREE_CODE (decl) == FUNCTION_DECL); > > > >node->decl = decl; > > + > > + if (lookup_attribute ("omp declare target

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-11-03 Thread Jakub Jelinek
On Tue, Oct 28, 2014 at 10:30:47PM +0300, Ilya Verbin wrote: > --- a/gcc/cgraph.c > +++ b/gcc/cgraph.c > @@ -70,6 +70,7 @@ along with GCC; see the file COPYING3. If not see > #include "tree-dfa.h" > #include "profile.h" > #include "params.h" > +#include "context.h" > > /* FIXME: Only for PRO

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-10-28 Thread Ilya Verbin
On 24 Oct 16:20, Jakub Jelinek wrote: > Can't you do that when creating the cgraph or varpool nodes? > I'd expect the attribute to be already present on the decls at those spots. I cached "omp declare target" attribute in a symtab node. Is this patch better? OpenMP tests passed, make check in pro

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-10-24 Thread Jakub Jelinek
On Fri, Oct 24, 2014 at 06:16:01PM +0400, Ilya Verbin wrote: > We have to set the global have_offload flag in few places in omp-low.c and in > FE > (c/c-decl.c:c_decl_attributes, fortran/trans-common.c:build_common_decl, > fortran/trans-decl.c:add_attributes_to_decl). > This way looks for me a bit

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-10-24 Thread Ilya Verbin
On 20 Oct 15:19, Ilya Verbin wrote: > On 15 Oct 16:23, Richard Biener wrote: > > > +static bool > > > +initialize_offload (void) > > > +{ > > > + bool have_offload = false; > > > + struct cgraph_node *node; > > > + struct varpool_node *vnode; > > > + > > > + FOR_EACH_DEFINED_FUNCTION (node) > >

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-10-20 Thread Jakub Jelinek
On Mon, Oct 20, 2014 at 03:19:35PM +0400, Ilya Verbin wrote: > > > + /* If '#pragma omp critical' is inside target region, the symbol must > > > + have an 'omp declare target' attribute. */ > > > + omp_context *octx; > > > + for (octx = ctx->outer; octx; octx = octx->outer) > > > +

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-10-20 Thread Ilya Verbin
On 15 Oct 16:23, Richard Biener wrote: > > +static bool > > +initialize_offload (void) > > +{ > > + bool have_offload = false; > > + struct cgraph_node *node; > > + struct varpool_node *vnode; > > + > > + FOR_EACH_DEFINED_FUNCTION (node) > > +if (lookup_attribute ("omp declare target", DECL

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-10-15 Thread Richard Biener
On Wed, 1 Oct 2014, Ilya Verbin wrote: > On 30 Sep 13:40, Thomas Schwinge wrote: > > As just discussed for the libgcc changes in > > , > > just some suggestions regarding the terminology, where I think that the >

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-10-08 Thread Jakub Jelinek
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

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-10-08 Thread Jakub Jelinek
On Wed, Oct 01, 2014 at 08:13:32PM +0400, Ilya Verbin wrote: > @@ -1994,9 +1995,40 @@ output_in_order (bool no_reorder) >free (nodes); > } > > +/* Check whether there is at least one function or global variable to > offload. > + */ The */ alone on a line is weird, put the last word on th

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-10-01 Thread Ilya Verbin
On 30 Sep 13:40, Thomas Schwinge wrote: > As just discussed for the libgcc changes in > , > just some suggestions regarding the terminology, where I think that the > term »target« might be confusing in comments or

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-09-30 Thread Thomas Schwinge
Hi! As just discussed for the libgcc changes in , just some suggestions regarding the terminology, where I think that the term »target« might be confusing in comments or symbols' names. That is, in the following,

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-09-29 Thread Ilya Verbin
On 29 Sep 03:10, Jan Hubicka wrote: > dump for me implied debug dump. LTO is usually called streaming, so prehaps > need_lto_stremaing? Fixed. > > +initialize_offload (void) > Perhaps have_offload_p? Nothing is initialized here... The next patch will add some initialization to this function. An

Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming

2014-09-28 Thread Jan Hubicka
> 2014-09-27 Ilya Verbin > Ilya Tocar > Andrey Turetskiy > Bernd Schmidt > gcc/ > * cgraph.h (symtab_node): Add need_dump flag. > * cgraphunit.c: Include lto-section-names.h. > (initialize_offload): New function. > (ipa_passes): Initial