Commit 37555926 by Jan Hubicka Committed by Martin Liska

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
parent ec07e94b
2019-03-08 Jan Hubicka <hubicka@ucw.cz>
PR go/63560
* ipa-split.c (execute_split_functions): Do not split
'noinline' or 'section' function.
2019-03-08 Jakub Jelinek <jakub@redhat.com>
PR target/79846
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment