mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
[ThinLTO] Don't perform computeDeadSymbols during O0 link, as the result is never used (NFC)
llvm-svn: 292679
This commit is contained in:
parent
ad5b04fd3b
commit
7a9494b639
@ -856,6 +856,13 @@ Error LTO::runThinLTO(AddStreamFn AddStream, NativeObjectCache Cache,
|
||||
if (!ModuleToDefinedGVSummaries.count(Mod.first))
|
||||
ModuleToDefinedGVSummaries.try_emplace(Mod.first);
|
||||
|
||||
StringMap<FunctionImporter::ImportMapTy> ImportLists(
|
||||
ThinLTO.ModuleMap.size());
|
||||
StringMap<FunctionImporter::ExportSetTy> ExportLists(
|
||||
ThinLTO.ModuleMap.size());
|
||||
StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR;
|
||||
|
||||
if (Conf.OptLevel > 0) {
|
||||
// Compute "dead" symbols, we don't want to import/export these!
|
||||
DenseSet<GlobalValue::GUID> GUIDPreservedSymbols;
|
||||
for (auto &Res : GlobalResolutions) {
|
||||
@ -869,13 +876,6 @@ Error LTO::runThinLTO(AddStreamFn AddStream, NativeObjectCache Cache,
|
||||
auto DeadSymbols =
|
||||
computeDeadSymbols(ThinLTO.CombinedIndex, GUIDPreservedSymbols);
|
||||
|
||||
StringMap<FunctionImporter::ImportMapTy> ImportLists(
|
||||
ThinLTO.ModuleMap.size());
|
||||
StringMap<FunctionImporter::ExportSetTy> ExportLists(
|
||||
ThinLTO.ModuleMap.size());
|
||||
StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR;
|
||||
|
||||
if (Conf.OptLevel > 0) {
|
||||
ComputeCrossModuleImport(ThinLTO.CombinedIndex, ModuleToDefinedGVSummaries,
|
||||
ImportLists, ExportLists, &DeadSymbols);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user