[PATCH] D103372: [InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 4 23:59:35 PDT 2021


MaskRay added a comment.

I measured a stage 2 `-DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_INSTRUMENTED_COVERAGE=on` build on Linux x86-64.

  % ls -1 /tmp/out/s3-custom/**/*.o(.) | wc -l
  2174
  
  % stat -c %s /tmp/out/s3-custom/**/*.o(.) | awk '{s+=$1}END{print s}'
  6174683864
  % stat -c %s /tmp/out/s2-custom/**/*.o(.) | awk '{s+=$1}END{print s}'                                                                                                                                                                                                                      
  5992574864
  
  % stat -c %s /tmp/out/s3-custom/bin/clang-13
  683184016
  % stat -c %s /tmp/out/s2-custom/bin/clang-13                         
  617970256

For ELF the object file size decrease is 3%.  The non-stripped clang size decrease is 10%.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103372



More information about the cfe-commits mailing list