diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-12 16:39:38 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-06-12 16:39:38 +0000 |
commit | 8a472e4dd7195b35f2f4a85dce2a462c549acf97 (patch) | |
tree | 0217c78b6609de642a00c0b20891254d588bb1c2 /gcc/ipa.c | |
parent | 775d377d46fe81b10bc0d31eb3c0682212eda57c (diff) | |
download | gcc-8a472e4dd7195b35f2f4a85dce2a462c549acf97.tar.gz |
PR middle-end/49378
* ipa.c (cgraph_non_local_node_p_1, cgraph_local_node_p): Rule out
aliases and thunks.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174969 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r-- | gcc/ipa.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c index 4fd3b7ce598..3f7dac33cf4 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -119,7 +119,9 @@ process_references (struct ipa_ref_list *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_node *node, void *data ATTRIBUTE_UNUSED 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); } |