public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: gcc-patches@gcc.gnu.org, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH] Handle undefined extern vars in output_in_order
Date: Thu, 16 Jun 2016 14:25:00 -0000	[thread overview]
Message-ID: <20160616142524.GA93274@kam.mff.cuni.cz> (raw)
In-Reply-To: <alpine.LNX.2.20.1606161659170.16817@monopod.intra.ispras.ru>

> On Thu, 9 Jun 2016, Alexander Monakov wrote:
> 
> > Hi,
> > 
> > This patch teaches cgraphunit.c:output_in_order to output undefined external
> > variables via assemble_undefined_decl.  At the moment that is only done for
> > -ftoplevel-reorder in varpool.c:symbol_table::output_variables.  This patch
> > makes both behave the same way.  I've also made handling of variables in both
> > functions look similar to each other.
> 
> Ping.
+  FOR_EACH_VARIABLE (pv)
+    {
+      if (no_reorder && !pv->no_reorder)
+	continue;
+      if (DECL_HARD_REGISTER (pv->decl))
+	continue;
+      if (DECL_HAS_VALUE_EXPR_P (pv->decl))
+	{
+	  gcc_checking_assert (lookup_attribute ("omp declare target link",
+						 DECL_ATTRIBUTES (pv->decl)));
+#ifdef ACCEL_COMPILER
+	  continue;
+#endif
+	}
+      i = pv->order;
+      gcc_assert (nodes[i].kind == ORDER_UNDEFINED);
+      nodes[i].kind = pv->definition ? ORDER_VAR : ORDER_VAR_UNDEF;
+      nodes[i].u.v = pv;

order for undefined variables is not computed, so it will be 0. Doesn't think overwrite existing
entries of nodes array?

Honza
> 
> Thanks.
> Alexander

  reply	other threads:[~2016-06-16 14:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-09 13:13 Alexander Monakov
2016-06-16 13:59 ` Alexander Monakov
2016-06-16 14:25   ` Jan Hubicka [this message]
2016-06-16 14:37     ` Alexander Monakov
2016-06-16 15:24       ` Jan Hubicka
2016-06-16 15:36         ` Alexander Monakov
2016-06-16 15:42           ` Jan Hubicka
2016-06-23 14:45             ` Alexander Monakov
2016-07-01  6:58               ` Alexander Monakov
2016-07-08  7:47                 ` Alexander Monakov
2016-07-14 18:08               ` Jeff Law
2016-07-14 18:34                 ` Alexander Monakov
2016-07-14 20:28                   ` Jeff Law
2016-07-14 20:31               ` Jeff Law

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=20160616142524.GA93274@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=amonakov@ispras.ru \
    --cc=gcc-patches@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).