summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ProfileData/InstrProf.cpp
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-01-20 01:26:34 +0000
committerXinliang David Li <davidxl@google.com>2016-01-20 01:26:34 +0000
commit59411db5202ed5a4e680457109cdbeed217219b6 (patch)
tree9e2452b5de4c268ec505867ac5850e26025623a6 /llvm/lib/ProfileData/InstrProf.cpp
parent19352b1cbe2763857b13f45c632d01f3d089f0d6 (diff)
downloadbcm5719-llvm-59411db5202ed5a4e680457109cdbeed217219b6.tar.gz
bcm5719-llvm-59411db5202ed5a4e680457109cdbeed217219b6.zip
[PGO] Add a new interface to be used by Indirect Call Promotion
llvm-svn: 258271
Diffstat (limited to 'llvm/lib/ProfileData/InstrProf.cpp')
-rw-r--r--llvm/lib/ProfileData/InstrProf.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp
index f856c25789e..8482b18f1e0 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -165,6 +165,13 @@ GlobalVariable *createPGOFuncNameVar(Function &F, StringRef FuncName) {
return createPGOFuncNameVar(*F.getParent(), F.getLinkage(), FuncName);
}
+void InstrProfSymtab::create(const Module &M) {
+ for (const Function &F : M)
+ addFuncName(getPGOFuncName(F));
+
+ finalizeSymtab();
+}
+
int collectPGOFuncNameStrings(const std::vector<std::string> &NameStrs,
bool doCompression, std::string &Result) {
uint8_t Header[16], *P = Header;
OpenPOWER on IntegriCloud