[PATCH] D67249: [Modules][PCH] Hash input files content

Juergen Ributzka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 6 15:42:30 PDT 2019


ributzka added inline comments.


================
Comment at: clang/lib/Serialization/ASTWriter.cpp:1767
   bool IsTopLevelModuleMap;
+  uint32_t ContentHash[2];
 };
----------------
bruno wrote:
> aprantl wrote:
> > Why is this not a uint64_t?
> Serializing a `uint64_t` directly instead of two `uint32_t` gives me a slightly bigger final cache. One could argue that the value is negligible (+800 bytes for a 40MB cache), but here's the rationale :)
Creating an abbrev might fix this, because this should be a fixed size field. The generic emission code for a record without an abbrev is not very space efficient for single fields.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67249





More information about the cfe-commits mailing list