[php-src] PR #18814: Fix GH-14551: PGO build fails with xxhash
| From: | nielsdos | Date: | Mon, 09 Jun 2025 16:07:23 +0000 |
| Subject: | [php-src] PR #18814: Fix GH-14551: PGO build fails with xxhash | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-32039@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/18814
Author: nielsdos
Turns out that the instrumentation added for gcov can change inlining decisions of the compiler,
which results in a mismatch between the profile data CFG and the actual generated CFG between
compiles.
There are two functions that suffer from this issue:
1. _PHP_XXH3_Init: Removing the inline hint fixes this one. In fact, always inlining this makes no
sense as there's no real opportunity for specialising. It just bloats the binary and increases
I$ pressure. So besides fixing this issue it's beneficial on its own to drop the attribute.
2. PHP_XXH3_128_Final: Sometimes XXH128_canonicalFromHash gets inlined and sometimes not. Make sure
it gets always inlined.
---
As a side note, since we already have some custom patches to
xxhash.h, it would be
beneficial to:
1. Sync upstream
2. Use a patchfile for PHP-specific additions