[PATCH] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one.

Shreyas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 11 04:18:24 PDT 2023


SAtacker added inline comments.


================
Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:288
+      }
+      for (auto &SpecInfo : LazySpecializations) {
+        Record.push_back(SpecInfo.DeclID);
----------------
ChuanqiXu wrote:
> v.g.vassilev wrote:
> > We should not store the lazy specialization information as an array of items because that makes the search slow. Instead we should use the `OnDiskHashTable` approach which we use already to store the identifier data.
> Do you want to implement it in this patch? Or this is a note for future optimizations?
I tried it here https://reviews.llvm.org/D144831 but to my surprise it gives worse performance for my testing environment which generates random specializations per module and a single main file.


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

https://reviews.llvm.org/D41416



More information about the cfe-commits mailing list