Commit 0b37ba8a by Andi Kleen Committed by Andi Kleen

Always set DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT correctly

When profiling is disabled force DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT
for each function to one. This information is then preserved
through LTO.

With this patch for LTO builds -pg needs to be set on both the
LTO final link and the original source build, to allow -pg
(or -pg -fentry) to be active for that source file. This allows
to build large projects mostly with -pg, except for a few files,
and still use LTO.

gcc/:

2014-09-15  Andi Kleen  <ak@linux.intel.com>

	* function.c (allocate_struct_function): Force
	DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT to one when
	profiling is disabled.

From-SVN: r215284
parent e9305042
2014-09-15 Andi Kleen <ak@linux.intel.com>
* function.c (allocate_struct_function): Force
DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT to one when
profiling is disabled.
2014-09-15 Trevor Saunders <tsaunders@mozilla.com> 2014-09-15 Trevor Saunders <tsaunders@mozilla.com>
* cfgrtl.c, combine.c, config/arc/arc.c, config/mcore/mcore.c, * cfgrtl.c, combine.c, config/arc/arc.c, config/mcore/mcore.c,
...@@ -4555,6 +4555,9 @@ allocate_struct_function (tree fndecl, bool abstract_p) ...@@ -4555,6 +4555,9 @@ allocate_struct_function (tree fndecl, bool abstract_p)
but is this worth the hassle? */ but is this worth the hassle? */
cfun->can_throw_non_call_exceptions = flag_non_call_exceptions; cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions; cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
if (!profile_flag && !flag_instrument_function_entry_exit)
DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (fndecl) = 1;
} }
} }
......
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