From: Jakub Jelinek <jakub@redhat.com>
To: Ilya Verbin <iverbin@gmail.com>
Cc: Richard Biener <rguenther@suse.de>,
Thomas Schwinge <thomas@codesourcery.com>,
Jan Hubicka <hubicka@ucw.cz>,
gcc-patches@gcc.gnu.org,
Kirill Yukhin <kirill.yukhin@gmail.com>,
Ilya Tocar <tocarip@gmail.com>,
Andrey Turetskiy <andrey.turetskiy@gmail.com>,
Bernd Schmidt <bernds@codesourcery.com>
Subject: Re: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming
Date: Mon, 03 Nov 2014 09:24:00 -0000 [thread overview]
Message-ID: <20141103092447.GO5026@tucnak.redhat.com> (raw)
In-Reply-To: <20141028193047.GA17865@msticlxl57.ims.intel.com>
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 PROP_loops, but cgraph shouldn't have to know about this. */
> #include "tree-pass.h"
> @@ -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", DECL_ATTRIBUTES (decl)))
> + {
> + node->offloadable = 1;
> + g->have_offload = true;
> + }
I wonder if we shouldn't optimize here and call lookup_attribute only
if there is a chance that the attribute might be present, so guard with
flag_openmp (and flag_openacc later on?). During LTO the cgraph nodes
are streamed in and supposedly the flag offloadable too.
> @@ -2129,8 +2141,12 @@ symbol_table::compile (void)
> fprintf (stderr, "Performing interprocedural optimizations\n");
> state = IPA;
>
> + /* OpenMP offloading requires LTO infrastructure. */
> + if (!in_lto_p && flag_openmp && g->have_offload)
> + flag_generate_lto = 1;
On the other side, do you need flag_openmp here? Supposedly g->have_offload
would already been set if needed.
Jakub
next prev parent reply other threads:[~2014-11-03 9:24 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-27 18:17 Ilya Verbin
2014-09-29 1:10 ` Jan Hubicka
2014-09-29 17:37 ` Ilya Verbin
2014-09-30 11:40 ` Thomas Schwinge
2014-10-01 16:13 ` Ilya Verbin
2014-10-08 8:45 ` Jakub Jelinek
2014-10-08 9:13 ` Jakub Jelinek
2014-10-15 14:28 ` Richard Biener
2014-10-20 11:21 ` Ilya Verbin
2014-10-20 11:26 ` Jakub Jelinek
2014-10-24 14:16 ` Ilya Verbin
2014-10-24 14:29 ` Jakub Jelinek
2014-10-28 19:32 ` Ilya Verbin
2014-11-03 9:24 ` Jakub Jelinek [this message]
2014-11-05 12:47 ` Ilya Verbin
2014-11-05 12:50 ` Jakub Jelinek
2014-11-07 14:41 ` Kirill Yukhin
2014-11-12 9:32 ` Richard Biener
2014-11-12 14:11 ` Kirill Yukhin
2014-11-12 14:23 ` Richard Biener
2014-11-12 14:35 ` Kirill Yukhin
2014-11-12 14:41 ` Richard Biener
2014-11-12 17:38 ` Ilya Verbin
2014-11-13 8:51 ` Richard Biener
2015-07-31 15:37 ` Thomas Schwinge
2015-07-31 15:43 ` Ilya Verbin
2015-08-05 8:40 ` Richard Biener
2015-08-05 15:09 ` Ilya Verbin
2015-08-14 9:49 ` Forwarding -foffload=[...] from the driver (compile-time) to libgomp (run-time) (was: [PATCH 2/n] OpenMP 4.0 offloading infrastructure: LTO streaming) Thomas Schwinge
2015-08-14 13:29 ` Ilya Verbin
2015-08-17 13:57 ` Martin Jambor
2015-08-14 17:08 ` Joseph Myers
2015-08-14 21:48 ` Forwarding -foffload=[...] from the driver (compile-time) to libgomp (run-time) Thomas Schwinge
2015-08-15 4:03 ` Joseph Myers
2015-08-18 16:55 ` Thomas Schwinge
2015-08-20 23:38 ` Joseph Myers
2015-08-21 16:13 ` Nathan Sidwell
2015-08-21 16:21 ` Joseph Myers
2015-08-24 18:05 ` Joseph Myers
2015-08-24 22:50 ` Joseph Myers
2015-08-24 23:26 ` Nathan Sidwell
2015-08-25 15:04 ` Joseph Myers
2018-05-20 20:30 ` [og7] " Thomas Schwinge
2015-08-27 20:58 Pass -foffload targets from driver to libgomp at link time Joseph Myers
2015-09-03 14:58 ` Ping " Joseph Myers
2015-09-10 14:01 ` Ping^2 " Joseph Myers
2015-09-10 14:03 ` Bernd Schmidt
2015-09-11 14:29 ` Joseph Myers
2015-09-11 14:48 ` Bernd Schmidt
2015-09-11 15:28 ` Joseph Myers
2015-09-11 15:47 ` Jakub Jelinek
2015-09-11 16:16 ` Joseph Myers
2015-09-28 10:09 ` Thomas Schwinge
2015-09-29 9:48 ` Jakub Jelinek
2015-09-30 16:15 ` Thomas Schwinge
2015-10-19 16:56 ` Forwarding -foffload=[...] from the driver (compile-time) to libgomp (run-time) Thomas Schwinge
2015-10-20 10:03 ` Jakub Jelinek
2015-10-20 10:44 ` Bernd Schmidt
2015-10-20 11:18 ` Thomas Schwinge
2015-10-20 11:49 ` Bernd Schmidt
2015-10-20 12:13 ` Jakub Jelinek
2015-10-20 11:52 ` 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=20141103092447.GO5026@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=andrey.turetskiy@gmail.com \
--cc=bernds@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=iverbin@gmail.com \
--cc=kirill.yukhin@gmail.com \
--cc=rguenther@suse.de \
--cc=thomas@codesourcery.com \
--cc=tocarip@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).