summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2015-12-05 05:16:36 +0000
committerXinliang David Li <davidxl@google.com>2015-12-05 05:16:36 +0000
commit307902e297cf252a2395c3c483e8b078e9b2c5ea (patch)
treec42c8503521625b54bf1b5095ceff0a948dbb11e /llvm/lib/ProfileData
parent833fe143f5eedd9c5a4e6f7f1b571840715d488a (diff)
downloadbcm5719-llvm-307902e297cf252a2395c3c483e8b078e9b2c5ea.tar.gz
bcm5719-llvm-307902e297cf252a2395c3c483e8b078e9b2c5ea.zip
[PGO] Add version to getPGOFuncName method
Different version of indexed format may use different name uniquing schemes for static functions. Pass the version info to the name interface so that different schmes can be picked (for profile lookup). llvm-svn: 254838
Diffstat (limited to 'llvm/lib/ProfileData')
-rw-r--r--llvm/lib/ProfileData/InstrProf.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp
index 530be8ac044..a965a1208b5 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -74,7 +74,8 @@ namespace llvm {
std::string getPGOFuncName(StringRef RawFuncName,
GlobalValue::LinkageTypes Linkage,
- StringRef FileName) {
+ StringRef FileName,
+ uint64_t Version LLVM_ATTRIBUTE_UNUSED) {
// Function names may be prefixed with a binary '1' to indicate
// that the backend should not modify the symbols due to any platform
@@ -96,8 +97,9 @@ std::string getPGOFuncName(StringRef RawFuncName,
return FuncName;
}
-std::string getPGOFuncName(const Function &F) {
- return getPGOFuncName(F.getName(), F.getLinkage(), F.getParent()->getName());
+std::string getPGOFuncName(const Function &F, uint64_t Version) {
+ return getPGOFuncName(F.getName(), F.getLinkage(), F.getParent()->getName(),
+ Version);
}
GlobalVariable *createPGOFuncNameVar(Module &M,
OpenPOWER on IntegriCloud