public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/marxin/heads/slp-function-v2)] openmp: ensure variables in offload table are streamed out (PRs 94848 + 95551)
Date: Thu, 11 Jun 2020 10:07:54 +0000 (GMT)	[thread overview]
Message-ID: <20200611100754.687FC3951E44@sourceware.org> (raw)

https://gcc.gnu.org/g:bf4ab2689bb586971d5b2ab6b13d078cd7ac45af

commit bf4ab2689bb586971d5b2ab6b13d078cd7ac45af
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Tue Jun 9 16:31:22 2020 +0200

    openmp: ensure variables in offload table are streamed out (PRs 94848 + 95551)
    
    gcc/ChangeLog:
    
            * omp-offload.c (add_decls_addresses_to_decl_constructor,
            omp_finish_file): With in_lto_p, stream out all offload-table
            items even if the symtab_node does not exist.

Diff:
---
 gcc/omp-offload.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c
index 4e44cfc9d0a..32c2485abd4 100644
--- a/gcc/omp-offload.c
+++ b/gcc/omp-offload.c
@@ -126,7 +126,7 @@ add_decls_addresses_to_decl_constructor (vec<tree, va_gc> *v_decls,
 	  && lookup_attribute ("omp declare target link", DECL_ATTRIBUTES (it));
 
       /* See also omp_finish_file and output_offload_tables in lto-cgraph.c.  */
-      if (!symtab_node::get (it))
+      if (!in_lto_p && !symtab_node::get (it))
 	continue;
 
       tree size = NULL_TREE;
@@ -382,14 +382,14 @@ omp_finish_file (void)
 	  tree it = (*offload_funcs)[i];
 	  /* See also add_decls_addresses_to_decl_constructor
 	     and output_offload_tables in lto-cgraph.c.  */
-	  if (!symtab_node::get (it))
+	  if (!in_lto_p && !symtab_node::get (it))
 	    continue;
 	  targetm.record_offload_symbol (it);
 	}
       for (unsigned i = 0; i < num_vars; i++)
 	{
 	  tree it = (*offload_vars)[i];
-	  if (!symtab_node::get (it))
+	  if (!in_lto_p && !symtab_node::get (it))
 	    continue;
 #ifdef ACCEL_COMPILER
 	  if (DECL_HAS_VALUE_EXPR_P (it)


             reply	other threads:[~2020-06-11 10:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 10:07 Martin Liska [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-06-11 10:04 Martin Liska

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=20200611100754.687FC3951E44@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /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).