[llvm] 8be84e1 - [LTO] Add debug logging for module ID <-> path mapping
Jez Ng via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 9 13:25:55 PST 2023
Author: Jez Ng
Date: 2023-03-09T13:25:48-08:00
New Revision: 8be84e1e31126a60b585a53a2943d0a6eafe4be2
URL: https://github.com/llvm/llvm-project/commit/8be84e1e31126a60b585a53a2943d0a6eafe4be2
DIFF: https://github.com/llvm/llvm-project/commit/8be84e1e31126a60b585a53a2943d0a6eafe4be2.diff
LOG: [LTO] Add debug logging for module ID <-> path mapping
It's helpful
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D145541
Added:
Modified:
llvm/lib/LTO/LTO.cpp
Removed:
################################################################################
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 1b1cbe463ad7f..1f273a8e5025f 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -925,13 +925,16 @@ Error LTO::addThinLTO(BitcodeModule BM, ArrayRef<InputFile::Symbol> Syms,
}
}
+ uint64_t ModuleId = ThinLTO.ModuleMap.size();
if (Error Err =
BM.readSummary(ThinLTO.CombinedIndex, BM.getModuleIdentifier(),
- ThinLTO.ModuleMap.size(), [&](GlobalValue::GUID GUID) {
+ ModuleId, [&](GlobalValue::GUID GUID) {
return ThinLTO.PrevailingModuleForGUID[GUID] ==
BM.getModuleIdentifier();
}))
return Err;
+ LLVM_DEBUG(dbgs() << "Module " << ModuleId << ": " << BM.getModuleIdentifier()
+ << "\n");
for (const InputFile::Symbol &Sym : Syms) {
assert(ResI != ResE);
More information about the llvm-commits
mailing list