[cfe-dev] [RFC] Compressing AST files by default?

Ilya Palachev via cfe-dev cfe-dev at lists.llvm.org
Thu Oct 20 02:23:57 PDT 2016


Hi,

It seems that compressing AST files with simple "gzip --fast" makes them 
30-40% smaller.
So the questions are:
  1. Is current AST serialization format really non-compressed (only 
abbreviations in bit stream format)?
  2. Is it worthwhile to compress AST by default (with -emit-ast)?
  3. Will this break things like PCH?
  4. What's the current trade-off between PCH compile time and disk 
usage? If AST compression makes compilation a bit slower, but reduces 
the disk usage significantly, will this be appropriate for users or not?

LLVM already has a support for compression (functions 
compress/uncompress in include/llvm/Support/Compression.h).

Best regards,
Ilya Palachev



More information about the cfe-dev mailing list