From: Jan Hubicka Date: Fri, 8 Mar 2019 12:37:54 +0000 (+0100) Subject: Restrict IPA split (PR go/63560). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=37555926fe70c828675b5d3e165cb291b283a978;p=gcc.git Restrict IPA split (PR go/63560). 2019-03-08 Jan Hubicka PR go/63560 * ipa-split.c (execute_split_functions): Do not split 'noinline' or 'section' function. From-SVN: r269491 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f56b266227d..de7bdde2b9a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-03-08 Jan Hubicka + + PR go/63560 + * ipa-split.c (execute_split_functions): Do not split + 'noinline' or 'section' function. + 2019-03-08 Jakub Jelinek PR target/79846 diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index cfd03abb07d..5eaf8257f98 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)