From 307902e297cf252a2395c3c483e8b078e9b2c5ea Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Sat, 5 Dec 2015 05:16:36 +0000 Subject: [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 --- llvm/lib/ProfileData/InstrProf.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'llvm/lib/ProfileData') 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, -- cgit v1.2.3