[llvm-dev] Issue with the function hash used as PGO index

Serge Guelton via llvm-dev llvm-dev at lists.llvm.org
Thu May 14 23:59:23 PDT 2020


Hi Folks,

This review

    https://reviews.llvm.org/D79961 

fixes a relatively serious bug in the computation of the function hash used to
compute index in profile files in clang. Basically the bug was allowing trivial
hash collision of two function that only differ by their last statement(s). This
could lead to segfaukts like this one [1].

I'm happy with the patch (if you want to review it, please jump in) but I'm also
worried that it changes the hash of *most* functions, thus invalidating all
profile files generated with previous clang revision.

So if it lands, people will find themselves with a lot of obsolete profile data
that need to be regenerated... I think I'd at least state that clearly on the
mlist, due to the potential large impact.

- Serge


[1] https://bugzilla.redhat.com/show_bug.cgi?id=1827282



More information about the llvm-dev mailing list