aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-07-27 09:53:33 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2017-07-27 09:53:33 +0200
commit036ea39917b0ef6f07a7c3c3c06002c73fd238f5 (patch)
treea35982ffc34baaebfbff808b7c0ae77b320f7b36 /gcc/tree-ssa-structalias.c
parent2443509ba815ae9acc5303846661c409fa63436a (diff)
downloadgcc-036ea39917b0ef6f07a7c3c3c06002c73fd238f5.zip
gcc-036ea39917b0ef6f07a7c3c3c06002c73fd238f5.tar.gz
gcc-036ea39917b0ef6f07a7c3c3c06002c73fd238f5.tar.bz2
attribs.c (decl_attributes): Imply noinline, noclone and no_icf attributes for noipa attribute.
* attribs.c (decl_attributes): Imply noinline, noclone and no_icf attributes for noipa attribute. For naked attribute use lookup_attribute first before lookup_attribute_spec. * final.c (rest_of_handle_final): Disable IPA RA for functions with noipa attribute. * ipa-visibility.c (non_local_p): Fix comment typos. Return true for functions with noipa attribute. (cgraph_externally_visible_p): Return true for functions with noipa attribute. * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE for functions with noipa attribute. * doc/extend.texi: Document noipa function attribute. * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p also for functions with noipa attribute. (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute. c-family/ * c-attribs.c (c_common_attribute_table): Add noipa attribute. (handle_noipa_attribute): New function. testsuite/ * gcc.dg/attr-noipa.c: New test. * gcc.dg/ipa/ipa-pta-18.c: New test. * gcc.dg/ipa/ipa-sra-11.c: New test. From-SVN: r250607
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 16746e3..e743e35 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -7764,7 +7764,8 @@ refered_from_nonlocal_fn (struct cgraph_node *node, void *data)
bool *nonlocal_p = (bool *)data;
*nonlocal_p |= (node->used_from_other_partition
|| node->externally_visible
- || node->force_output);
+ || node->force_output
+ || lookup_attribute ("noipa", DECL_ATTRIBUTES (node->decl)));
return false;
}
@@ -7824,7 +7825,9 @@ ipa_pta_execute (void)
constraints for parameters. */
bool nonlocal_p = (node->used_from_other_partition
|| node->externally_visible
- || node->force_output);
+ || node->force_output
+ || lookup_attribute ("noipa",
+ DECL_ATTRIBUTES (node->decl)));
node->call_for_symbol_thunks_and_aliases (refered_from_nonlocal_fn,
&nonlocal_p, true);