summaryrefslogtreecommitdiff
path: root/gcc/ipa-visibility.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2017-07-27 07:53:33 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2017-07-27 07:53:33 +0000
commit280ce47d0f9dac29584586ae964826fffa4ab22f (patch)
treea35982ffc34baaebfbff808b7c0ae77b320f7b36 /gcc/ipa-visibility.c
parent2df660ce815503149961448d13329926ecb0f3af (diff)
downloadgcc-280ce47d0f9dac29584586ae964826fffa4ab22f.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250607 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-visibility.c')
-rw-r--r--gcc/ipa-visibility.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ipa-visibility.c b/gcc/ipa-visibility.c
index 13cf2a3a1cf..3033f20e3f1 100644
--- a/gcc/ipa-visibility.c
+++ b/gcc/ipa-visibility.c
@@ -92,10 +92,11 @@ non_local_p (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED)
{
return !(node->only_called_directly_or_aliased_p ()
/* i386 would need update to output thunk with local calling
- convetions. */
+ conventions. */
&& !node->thunk.thunk_p
&& node->definition
&& !DECL_EXTERNAL (node->decl)
+ && !lookup_attribute ("noipa", DECL_ATTRIBUTES (node->decl))
&& !node->externally_visible
&& !node->used_from_other_partition
&& !node->in_other_partition
@@ -211,6 +212,8 @@ cgraph_externally_visible_p (struct cgraph_node *node,
if (lookup_attribute ("externally_visible",
DECL_ATTRIBUTES (node->decl)))
return true;
+ if (lookup_attribute ("noipa", DECL_ATTRIBUTES (node->decl)))
+ return true;
if (TARGET_DLLIMPORT_DECL_ATTRIBUTES
&& lookup_attribute ("dllexport",
DECL_ATTRIBUTES (node->decl)))