From: Jan Hubicka <hubicka@ucw.cz>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Jan Hubicka <hubicka@ucw.cz>, gcc-patches@gcc.gnu.org
Subject: Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)
Date: Sun, 12 Jun 2011 17:13:00 -0000 [thread overview]
Message-ID: <20110612164059.GE19441@kam.mff.cuni.cz> (raw)
In-Reply-To: <BANLkTi=dv6ZauuJzSy9vgN713cCLg8ObvA@mail.gmail.com>
Hi,
this is the fix (or rather a workaround) i comitted. Thanks!
Index: ChangeLog
===================================================================
--- ChangeLog (revision 174968)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2011-06-11 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/49378
+ * ipa.c (cgraph_non_local_node_p_1, cgraph_local_node_p): Rule out
+ aliases and thunks.
+
2011-06-12 Ira Rosen <ira.rosen@linaro.org>
* tree-vect-data-refs.c (vect_peeling_hash_get_most_frequent):
Index: ipa.c
===================================================================
--- ipa.c (revision 174958)
+++ ipa.c (working copy)
@@ -119,7 +119,9 @@ process_references (struct ipa_ref_list
static bool
cgraph_non_local_node_p_1 (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED)
{
+ /* FIXME: Aliases can be local, but i386 gets thunks wrong then. */
return !(cgraph_only_called_directly_or_aliased_p (node)
+ && !ipa_ref_has_aliases_p (&node->ref_list)
&& node->analyzed
&& !DECL_EXTERNAL (node->decl)
&& !node->local.externally_visible
@@ -132,7 +134,13 @@ cgraph_non_local_node_p_1 (struct cgraph
static bool
cgraph_local_node_p (struct cgraph_node *node)
{
- return !cgraph_for_node_and_aliases (cgraph_function_or_thunk_node (node, NULL),
+ struct cgraph_node *n = cgraph_function_or_thunk_node (node, NULL);
+
+ /* FIXME: thunks can be considered local, but we need prevent i386
+ from attempting to change calling convention of them. */
+ if (n->thunk.thunk_p)
+ return false;
+ return !cgraph_for_node_and_aliases (n,
cgraph_non_local_node_p_1, NULL, true);
}
next prev parent reply other threads:[~2011-06-12 16:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-11 14:22 Jan Hubicka
2011-06-11 17:31 ` H.J. Lu
2011-06-12 9:02 ` H.J. Lu
2011-06-12 15:08 ` Jan Hubicka
2011-06-12 15:45 ` H.J. Lu
2011-06-12 15:55 ` Jan Hubicka
2011-06-12 16:33 ` H.J. Lu
2011-06-12 16:29 ` H.J. Lu
2011-06-12 17:06 ` Jan Hubicka
2011-06-12 17:46 ` H.J. Lu
2011-06-12 17:13 ` Jan Hubicka [this message]
2011-06-12 18:07 ` H.J. Lu
2011-06-12 22:11 ` Jan Hubicka
2011-06-19 12:52 ` Hans-Peter Nilsson
2011-06-19 12:55 ` Jan Hubicka
2011-06-19 14:04 ` Jan Hubicka
2011-06-20 11:23 ` Richard Guenther
2011-06-20 14:47 ` Hans-Peter Nilsson
2011-06-22 21:54 ` Hans-Peter Nilsson
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=20110612164059.GE19441@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@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).