[all-commits] [llvm/llvm-project] 7c298c: [PGO] Fix computation of function Hash
serge-sans-paille via All-commits
all-commits at lists.llvm.org
Mon May 25 08:17:57 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 7c298c104bfe725d4315926a656263e8a5ac3054
https://github.com/llvm/llvm-project/commit/7c298c104bfe725d4315926a656263e8a5ac3054
Author: serge-sans-paille <sguelton at redhat.com>
Date: 2020-05-25 (Mon, 25 May 2020)
Changed paths:
M clang/lib/CodeGen/CodeGenPGO.cpp
A clang/test/Profile/c-collision.c
Log Message:
-----------
[PGO] Fix computation of function Hash
Previous implementation was incorrectly passing an uint64_t, that got converted
to an uint8_t, to finalize the hash computation. This led to different functions
having the same hash if they only differ by the remaining statements, which is
incorrect.
Added a new test case that trivially tests that a small function change is
reflected in the hash value.
Not that as this patch fixes the hash computation, it invalidates all hashes
computed before that patch applies, which could be an issue for large build
system that pre-compute the profile data and let client download them as part of
the build process.
Differential Revision: https://reviews.llvm.org/D79961
More information about the All-commits
mailing list