aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-03-24 11:31:39 -0700
committerFangrui Song <i@maskray.me>2022-03-24 11:31:39 -0700
commitd3e5b6f7539b86995aef6e2075c1edb3059385ce (patch)
tree141980eb55ad1303e44d012581e533c1a98aab4d /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
parent418ecaba3e6271a2b3bf2e202fa85085d67adc47 (diff)
downloadllvm-d3e5b6f7539b86995aef6e2075c1edb3059385ce.zip
llvm-d3e5b6f7539b86995aef6e2075c1edb3059385ce.tar.gz
llvm-d3e5b6f7539b86995aef6e2075c1edb3059385ce.tar.bz2
[ELF] Implement --build-id={md5,sha1} with truncated BLAKE3
--build-id was introduced as "approximation of true uniqueness across all binaries that might be used by overlapping sets of people". It does not require the some resistance mentioned below. In practice, people just use --build-id=md5 for 16-byte build ID and --build-id=sha1 for 20-byte build ID. BLAKE3 has 256-bit key length, which provides 128-bit security against (second-)preimage, collision, and differentiability attacks. Its portable implementation is fast. It additionally provides Arm Neon/AVX2/AVX-512. Just implement --build-id={md5,sha1} with truncated BLAKE3. Linking clang 14 RelWithDebInfo with --threads=8 on a Skylake CPU: * 1.13x as fast with --build-id=md5 * 1.15x as fast with --build-id=sha1 --threads=4 on Apple m1: * 1.25x as fast with --build-id=md5 * 1.17x as fast with --build-id=sha1 Reviewed By: ikudrin Differential Revision: https://reviews.llvm.org/D121531
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
0 files changed, 0 insertions, 0 deletions