diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-03-08 13:37:54 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-03-08 12:37:54 +0000 |
commit | 37555926fe70c828675b5d3e165cb291b283a978 (patch) | |
tree | 91f2e0b58924ec8c3bbfd1ae7682013872c5e90e /gcc/ipa-split.c | |
parent | ec07e94bbf22be8cd8f47e34de5e764437e33774 (diff) | |
download | gcc-37555926fe70c828675b5d3e165cb291b283a978.zip gcc-37555926fe70c828675b5d3e165cb291b283a978.tar.gz gcc-37555926fe70c828675b5d3e165cb291b283a978.tar.bz2 |
Restrict IPA split (PR go/63560).
2019-03-08 Jan Hubicka <hubicka@ucw.cz>
PR go/63560
* ipa-split.c (execute_split_functions): Do not split
'noinline' or 'section' function.
From-SVN: r269491
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r-- | gcc/ipa-split.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index cfd03ab..5eaf825 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -104,6 +104,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple-pretty-print.h" #include "ipa-fnsummary.h" #include "cfgloop.h" +#include "attribs.h" /* Per basic block info. */ @@ -1751,6 +1752,20 @@ execute_split_functions (void) return 0; } + if (lookup_attribute ("noinline", DECL_ATTRIBUTES (current_function_decl))) + { + if (dump_file) + fprintf (dump_file, "Not splitting: function is noinline.\n"); + return 0; + } + if (lookup_attribute ("section", DECL_ATTRIBUTES (current_function_decl))) + { + if (dump_file) + fprintf (dump_file, "Not splitting: function is in user defined " + "section.\n"); + return 0; + } + /* We enforce splitting after loop headers when profile info is not available. */ if (profile_status_for_fn (cfun) != PROFILE_READ) |