summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2017-02-25 00:00:36 +0000
committerRong Xu <xur@google.com>2017-02-25 00:00:36 +0000
commita1a9f7053758d8f9c8b68d2057a8f47a69c12609 (patch)
treeb791089e9547951f653cb62478407a4356a2a812 /clang/lib/Frontend/CompilerInvocation.cpp
parent3fc6fb7137695e6512dd53a413fe7b50756a6279 (diff)
downloadbcm5719-llvm-a1a9f7053758d8f9c8b68d2057a8f47a69c12609.tar.gz
bcm5719-llvm-a1a9f7053758d8f9c8b68d2057a8f47a69c12609.zip
[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 llvm-svn: 296206
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud