From 59411db5202ed5a4e680457109cdbeed217219b6 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Wed, 20 Jan 2016 01:26:34 +0000 Subject: [PGO] Add a new interface to be used by Indirect Call Promotion llvm-svn: 258271 --- llvm/lib/ProfileData/InstrProf.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/ProfileData/InstrProf.cpp') 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 &NameStrs, bool doCompression, std::string &Result) { uint8_t Header[16], *P = Header; -- cgit v1.2.3