aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTO.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2022-11-15 07:39:40 -0800
committerTeresa Johnson <tejohnson@google.com>2022-11-15 07:39:40 -0800
commit452a14efc84edf808d1e2953dad2c694972b312f (patch)
treec8257d815249816bbf8b34f61ff011f125303470 /llvm/lib/LTO/LTO.cpp
parentdb5855d0e49c1a220bb7ba1cd61e6101a4a8626f (diff)
downloadllvm-452a14efc84edf808d1e2953dad2c694972b312f.zip
llvm-452a14efc84edf808d1e2953dad2c694972b312f.tar.gz
llvm-452a14efc84edf808d1e2953dad2c694972b312f.tar.bz2
Revert "[MemProf] ThinLTO summary support"
This reverts commit 47459455009db4790ffc3765a2ec0f8b4934c2a4. Revert while I try to fix a couple of non-Linux build failures.
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r--llvm/lib/LTO/LTO.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 9bfbabc..dc28b68 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -911,25 +911,9 @@ Error LTO::linkRegularLTO(RegularLTOState::AddedModule Mod,
Error LTO::addThinLTO(BitcodeModule BM, ArrayRef<InputFile::Symbol> Syms,
const SymbolResolution *&ResI,
const SymbolResolution *ResE) {
- const SymbolResolution *ResITmp = ResI;
- for (const InputFile::Symbol &Sym : Syms) {
- assert(ResITmp != ResE);
- SymbolResolution Res = *ResITmp++;
-
- if (!Sym.getIRName().empty()) {
- auto GUID = GlobalValue::getGUID(GlobalValue::getGlobalIdentifier(
- Sym.getIRName(), GlobalValue::ExternalLinkage, ""));
- if (Res.Prevailing)
- ThinLTO.PrevailingModuleForGUID[GUID] = BM.getModuleIdentifier();
- }
- }
-
if (Error Err =
BM.readSummary(ThinLTO.CombinedIndex, BM.getModuleIdentifier(),
- ThinLTO.ModuleMap.size(), [&](GlobalValue::GUID GUID) {
- return ThinLTO.PrevailingModuleForGUID[GUID] ==
- BM.getModuleIdentifier();
- }))
+ ThinLTO.ModuleMap.size()))
return Err;
for (const InputFile::Symbol &Sym : Syms) {
@@ -940,8 +924,7 @@ Error LTO::addThinLTO(BitcodeModule BM, ArrayRef<InputFile::Symbol> Syms,
auto GUID = GlobalValue::getGUID(GlobalValue::getGlobalIdentifier(
Sym.getIRName(), GlobalValue::ExternalLinkage, ""));
if (Res.Prevailing) {
- assert(ThinLTO.PrevailingModuleForGUID[GUID] ==
- BM.getModuleIdentifier());
+ ThinLTO.PrevailingModuleForGUID[GUID] = BM.getModuleIdentifier();
// For linker redefined symbols (via --wrap or --defsym) we want to
// switch the linkage to `weak` to prevent IPOs from happening.
@@ -1471,7 +1454,6 @@ ThinBackend lto::createWriteIndexesThinBackend(
Error LTO::runThinLTO(AddStreamFn AddStream, FileCache Cache,
const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols) {
- ThinLTO.CombinedIndex.releaseTemporaryMemory();
timeTraceProfilerBegin("ThinLink", StringRef(""));
auto TimeTraceScopeExit = llvm::make_scope_exit([]() {
if (llvm::timeTraceProfilerEnabled())