mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 23:23:38 -04:00
[ThinLTO] Add string saver onto index for value names
Summary: Adds a string saver to the ModuleSummaryIndex so it can store value names in the case of adding a ValueInfo for a GUID when we don't have the name stored in a Module string table. This is motivated by the upcoming summary parser patch, where we will read value names from the summary entry and want to store them, even when a Module is not available. Currently this allows us to store the name in the legacy bitcode case, and I have added a test to show that. Reviewers: pcc, dexonsmith Subscribers: mehdi_amini, inglorion, eraman, steven_wu, llvm-commits Differential Revision: https://reviews.llvm.org/D47842 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335570 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -607,14 +607,14 @@ ModuleSummaryIndexWrapperPass::ModuleSummaryIndexWrapperPass()
|
||||
|
||||
bool ModuleSummaryIndexWrapperPass::runOnModule(Module &M) {
|
||||
auto &PSI = *getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI();
|
||||
Index = buildModuleSummaryIndex(
|
||||
Index.emplace(buildModuleSummaryIndex(
|
||||
M,
|
||||
[this](const Function &F) {
|
||||
return &(this->getAnalysis<BlockFrequencyInfoWrapperPass>(
|
||||
*const_cast<Function *>(&F))
|
||||
.getBFI());
|
||||
},
|
||||
&PSI);
|
||||
&PSI));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user