[PATCH] D54815: [ThinLTO] Add summary entries for index-based WPD
Piotr Padlewski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 12:51:39 PDT 2019
Prazek added inline comments.
================
Comment at: llvm/include/llvm/IR/ModuleSummaryIndex.h:896
+ /// above where TypeIdCompatibleVtableInfo is defined.
+ std::map<std::string, TypeIdCompatibleVtableInfo> TypeIdCompatibleVtableMap;
+
----------------
Do we care about the alphabetical order in this mapping?
If not, the map can be changed to std::unordered_map (or other llvm-specific string map), which should be faster and more memory efficient.
================
Comment at: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:3691
- Stream.EmitRecord(bitc::FS_PERMODULE_GLOBALVAR_INIT_REFS, NameVals,
- FSModRefsAbbrev);
+ if (!VTableFuncs.empty()) {
+ // VTableFuncs pairs should already be sorted by offset.
----------------
Isn't this line redundant?
================
Comment at: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:3857
+ if (!Index->typeIdCompatibleVtableMap().empty()) {
+ for (auto &S : Index->typeIdCompatibleVtableMap()) {
----------------
Isn't this line redundant?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54815/new/
https://reviews.llvm.org/D54815
More information about the llvm-commits
mailing list