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

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 11 09:25:53 PDT 2023


v.g.vassilev added inline comments.


================
Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:288
+      }
+      for (auto &SpecInfo : LazySpecializations) {
+        Record.push_back(SpecInfo.DeclID);
----------------
SAtacker wrote:
> 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.
> Do you want to implement it in this patch? Or this is a note for future optimizations?

That was the intent since it was blocking the google folks. If that's not the case then maybe we can do it as a separate improvement...


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

https://reviews.llvm.org/D41416



More information about the cfe-commits mailing list