summaryrefslogtreecommitdiff
path: root/gcc/ipa-visibility.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-08 21:08:44 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-08 21:08:44 +0000
commita09576fe3202fe834af382074ef8d9bdc4286966 (patch)
tree93581bf5a3951c0e31978c7516fe277a75b60a7e /gcc/ipa-visibility.c
parent6543cf8b69187cb3da34928fc80b6186df5d91e0 (diff)
downloadgcc-a09576fe3202fe834af382074ef8d9bdc4286966.tar.gz
PR ipa/63566
* ipa-visibility.c (cgraph_node::non_local_p): Accept aliases. (cgraph_node::local_p): Remove thunk related FIXME. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220521 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-visibility.c')
-rw-r--r--gcc/ipa-visibility.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/gcc/ipa-visibility.c b/gcc/ipa-visibility.c
index 71894afc90a..00b28e6e89c 100644
--- a/gcc/ipa-visibility.c
+++ b/gcc/ipa-visibility.c
@@ -104,14 +104,15 @@ along with GCC; see the file COPYING3. If not see
bool
cgraph_node::non_local_p (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED)
{
- /* FIXME: Aliases can be local, but i386 gets thunks wrong then. */
- return !(node->only_called_directly_or_aliased_p ()
- && !node->has_aliases_p ()
- && node->definition
- && !DECL_EXTERNAL (node->decl)
- && !node->externally_visible
- && !node->used_from_other_partition
- && !node->in_other_partition);
+ return !(node->only_called_directly_or_aliased_p ()
+ /* i386 would need update to output thunk with locak calling
+ ocnvetions. */
+ && !node->thunk.thunk_p
+ && node->definition
+ && !DECL_EXTERNAL (node->decl)
+ && !node->externally_visible
+ && !node->used_from_other_partition
+ && !node->in_other_partition);
}
/* Return true when function can be marked local. */
@@ -121,12 +122,10 @@ cgraph_node::local_p (void)
{
cgraph_node *n = ultimate_alias_target ();
- /* 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 n->callees->callee->local_p ();
return !n->call_for_symbol_thunks_and_aliases (cgraph_node::non_local_p,
- NULL, true);
+ NULL, true);
}