[PATCH] D145541: [LTO] Add debug logging for module ID <-> path mapping

Kyungwoo Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 22:33:47 PST 2023


kyulee added inline comments.


================
Comment at: llvm/lib/LTO/LTO.cpp:938
+      dbgs() << "Module "
+             << ThinLTO.CombinedIndex.getModuleId(BM.getModuleIdentifier())
+             << ": " << BM.getModuleIdentifier() << "\n");
----------------
I don't think it matters too much as it's a debug code.
But if you hoist this code before `readSummary` above, you can get the module Id as below, and use it for both `readSummary` and this debug code.
```
uint64_t ModuleId = ThinLTO.ModuleMap.size();
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145541/new/

https://reviews.llvm.org/D145541



More information about the llvm-commits mailing list