[PATCH] D12715: Reduce PGO Instrumentation binary and profile data size (Patch-1)

David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 17:03:49 PDT 2015


davidxl created this revision.
davidxl added reviewers: llvm-commits, bogner, silvas, xur.

The change includes three patches
1) LLVM changes (Patch-1)
2) Clang Driver changes (Patch-2)
3) compile-rt (patch-3)

Description of the changes:
1) The patch implements a new option -f[no]-profile-instr-with-names option. When -fno-profile-instr-with-names is turned on, the instrumentation will use function assembly name's md5 hash string (hex form) instead of the raw name as the profile identification key. With this change, binary and profile size is greatly reduced
2) refactor of the instrumentation and compile-rt code such that Magic and Version (raw, and indexed) values for profile data is specified in one centralized place: InstrProf.h. To assist this change, compile_rt code no longer needs to hard code the version/magic values and will never be out of sync with instrumentor
3) The 64bit version field in the header is partitioned into two parts
  a) the lower 32bit is used to represent the format version as before
  b) the upper 32bit is now used to encode feature/variants of the profile data that share the same format. In this case, it can be used to indicate if the profile contains raw name keys or md5hash keys. Another use of the bit is the late instrumentation profile data. 


http://reviews.llvm.org/D12715

Files:
  include/llvm/ProfileData/InstrProf.h
  include/llvm/ProfileData/InstrProfReader.h
  include/llvm/ProfileData/InstrProfWriter.h
  include/llvm/Transforms/Instrumentation.h
  lib/ProfileData/InstrProfIndexed.h
  lib/ProfileData/InstrProfReader.cpp
  lib/ProfileData/InstrProfWriter.cpp
  lib/Transforms/Instrumentation/InstrProfiling.cpp
  test/Instrumentation/InstrProfiling/profiling.ll
  test/Instrumentation/InstrProfiling/profiling_md5hash_key.ll
  test/tools/llvm-profdata/raw-64-bits-le-md5.test
  tools/llvm-profdata/llvm-profdata.cpp
  unittests/ProfileData/InstrProfTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12715.34280.patch
Type: text/x-patch
Size: 25378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150909/0e8d8a6b/attachment.bin>


More information about the llvm-commits mailing list