Always set DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT correctly
commit4f6f9d05dfa21ebdff3ef1872cac2ba078123541
authorak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Sep 2014 03:22:41 +0000 (16 03:22 +0000)
committerak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Sep 2014 03:22:41 +0000 (16 03:22 +0000)
treefbcfa49214f70adb371ba5e9affc7d4ef955288e
parentadcaad2ca5bf5d7ab796bd1cb96a6a72c3646b5b
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215284 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/function.c