llvm/lib/ProfileData
Rong Xu dd2b6c53e8 [PGO] Directory name stripping in global identifier for static functions
Current internal option -static-func-full-module-prefix keeps all the
directory path the profile counter names for static functions. The default
of this option is false. This strips the directory names from the source
filename which is problematic:

(1) it creates linker errors for profile-generation compilation, exposed in
our internal benchmarks. We are seeing messages like
"warning: relocation refers to discarded section".
This is due to the name conflicts after the stripping.

(2) the stripping only applies to getPGOFuncName.
Current Thin-LTO module importing for the indirect-calls assumes
the source directory name not being stripped. Current default value
for this option can potentially prevent some inter-module
indirect-call-promotions.

This patch turns the default value for -static-func-full-module-prefix to true.

The second part of the patch is to have an alternative implementation under
 the internal option -static-func-strip-dirname-prefix=<value>

This options specifies level of directories to be stripped from the source
filename. Using a large value as the parameter has the same effect as
-static-func-full-module-prefix.

Differential Revision: http://reviews.llvm.org/D29512



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296206 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-25 00:00:36 +00:00
..
Coverage Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
CMakeLists.txt
InstrProf.cpp [PGO] Directory name stripping in global identifier for static functions 2017-02-25 00:00:36 +00:00
InstrProfReader.cpp Retire llvm::alignOf in favor of C++11 alignof. 2016-10-20 15:02:18 +00:00
InstrProfWriter.cpp
LLVMBuild.txt
ProfileSummaryBuilder.cpp
SampleProf.cpp Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
SampleProfReader.cpp Fix an obvious bug in SampleProfileReaderGCC. 2017-02-22 17:27:21 +00:00
SampleProfWriter.cpp