[PATCH] D71437: [PDB] Print the most redundant type record indices with /summary
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 21 17:29:56 PST 2019
MaskRay added inline comments.
================
Comment at: lld/COFF/PDB.cpp:431
+ // collecting statistics.
+ tpiCounts.resize(tMerger.getTypeTable().size());
+ ipiCounts.resize(tMerger.getIDTable().size());
----------------
Can `tpiCounts` be a non-empty vector before `resize()`?
If yes, `assign(tMerger.getTypeTable().size(), 0);`
================
Comment at: lld/COFF/PDB.cpp:437
+ if (dstIdx.isSimple())
+ continue; // Untranslated or other.
+ SmallVectorImpl<uint32_t> &counts =
----------------
Excuse my ignorance. What does "Untranslated or other" mean? I cannot find "untranslated" at other call sites of `isSimple`.
================
Comment at: lld/COFF/PDB.cpp:517
+ ipiCounts.resize(tMerger.getIDTable().size());
+ for (auto ti : indexMap.tpiMap)
+ ++tpiCounts[ti.toArrayIndex()];
----------------
auto -> TypeIndex
================
Comment at: lld/COFF/PDB.cpp:1390
+ };
+ SmallVector<TypeSizeInfo, 0> tsis;
+ for (auto e : enumerate(recCounts)) {
----------------
I've seen `SmallVector<..., 0>` in some code. Does that has any advantage over `std::vector<...>`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71437/new/
https://reviews.llvm.org/D71437
More information about the llvm-commits
mailing list