[cfe-dev] [RFC] cHash: Integration of AST hashing

Christian Dietrich via cfe-dev cfe-dev at lists.llvm.org
Thu Aug 3 05:34:41 PDT 2017


Alex Lorenz <aleksei_lorenz at apple.com> writes:

> I see, thanks. That sounds promising.
>
> Is the hash stored in a central database or do you use a separate file
> for each translation unit (or maybe something else)?

In the current implementation, we store the hash in a separate file
besides the object file. And since CMake removes the .o file, before the
compiler is invoked, we hardlink also the object file to another name.
So, for a single object file we then have:

foo.o
foo.o.hash.copy <- Hardlink to foo.o
foo.o.hash      <- Hexdigest of the hash

For the redundant-compilation-avoidance, we could also store the
hexdigest in a seperate ELF (or mach-o) section and parse the header
partially in the cHash pass.

chris
-- 
Christian Dietrich, M.Sc. (Scientific Staff)
Institute for Systems Engineering (Systems and Computerarchitecture)
Leibniz Universität Hannover
Appelstraße 4
30167 Hannover, Germany

Tel:    +49 511 762-19737
Fax:    +49 511 762-19733
eMail:  dietrich at sra.uni-hannover.de
WWW:    https://www.sra.uni-hannover.de



More information about the cfe-dev mailing list