[PATCH] D109632: [clang] de-duplicate methods from AST files

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 13 14:50:55 PDT 2021


vsapsai added a comment.

It's good to know `ASTReader::ReadMethodPool` is pretty close for both approaches. And as far as I understand, it includes the code

  ReadMethodPoolVisitor Visitor(*this, Sel, PriorGeneration);
  ModuleMgr.visit(Visitor);

so the module visiting doesn't seem to be too expensive.

I can be wrong but I like writing less data as it can result in savings for more projects. For example, if compile time is dominated by method deserialization and not by `Sema::addMethodToGlobalList`, we still should see an improvement. I can try to experiment on a bunch of other projects and their heavy .m files and report the results, if you'd like.

Also I've updated D110123 <https://reviews.llvm.org/D110123> to preserve the order of methods (mostly, there are still some differences). Works better than the previous approach, compilation time difference is within the noise.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109632



More information about the cfe-commits mailing list