Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
Show First 20 Lines • Show All 963 Lines • ▼ Show 20 Lines | for (const auto &M : Modules) | ||||
addUsedSymbolToPreservedGUID(*M, GUIDPreservedSymbols); | addUsedSymbolToPreservedGUID(*M, GUIDPreservedSymbols); | ||||
// Compute "dead" symbols, we don't want to import/export these! | // Compute "dead" symbols, we don't want to import/export these! | ||||
computeDeadSymbolsInIndex(*Index, GUIDPreservedSymbols); | computeDeadSymbolsInIndex(*Index, GUIDPreservedSymbols); | ||||
// Synthesize entry counts for functions in the combined index. | // Synthesize entry counts for functions in the combined index. | ||||
computeSyntheticCounts(*Index); | computeSyntheticCounts(*Index); | ||||
// Currently there is no support for enabling whole program visibility via a | |||||
// linker option in the old LTO API, but this call allows it to be specified | |||||
// via the internal option. Must be done before WPD below. | |||||
updateVCallVisibilityInIndex(*Index, | |||||
evgeny777: ditto | |||||
updateVCallVisibilityInIndex(*Index, /* WholeProgramVisibilityEnabledInLTO */ false) ? evgeny777: updateVCallVisibilityInIndex(*Index, /* WholeProgramVisibilityEnabledInLTO */ false) ? | |||||
Missed this one before (did the InModule version but not InIndex), fixed. tejohnson: Missed this one before (did the InModule version but not InIndex), fixed. | |||||
/* WholeProgramVisibilityEnabledInLTO */ false); | |||||
// Perform index-based WPD. This will return immediately if there are | // Perform index-based WPD. This will return immediately if there are | ||||
// no index entries in the typeIdMetadata map (e.g. if we are instead | // no index entries in the typeIdMetadata map (e.g. if we are instead | ||||
// performing IR-based WPD in hybrid regular/thin LTO mode). | // performing IR-based WPD in hybrid regular/thin LTO mode). | ||||
std::map<ValueInfo, std::vector<VTableSlotSummary>> LocalWPDTargetsMap; | std::map<ValueInfo, std::vector<VTableSlotSummary>> LocalWPDTargetsMap; | ||||
std::set<GlobalValue::GUID> ExportedGUIDs; | std::set<GlobalValue::GUID> ExportedGUIDs; | ||||
runWholeProgramDevirtOnIndex(*Index, ExportedGUIDs, LocalWPDTargetsMap); | runWholeProgramDevirtOnIndex(*Index, ExportedGUIDs, LocalWPDTargetsMap); | ||||
for (auto GUID : ExportedGUIDs) | for (auto GUID : ExportedGUIDs) | ||||
GUIDPreservedSymbols.insert(GUID); | GUIDPreservedSymbols.insert(GUID); | ||||
▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines |
ditto