Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix partial discarding of function hash info for PGO #3511

Merged
merged 2 commits into from
Jul 22, 2020
Merged

Conversation

JohanEngelen
Copy link
Member

See Clang PR: https://reviews.llvm.org/D79961

Note that we do not include versioning code for our PGO files: PGO files from older LDC versions are not guarantee to work with newer versions of LDC. The user will see warnings about different function hashes, so he is aware the profile is not applied for those functions. Hash clashes may occur (old version hash corresponding to different function newer version hash), which is unfortunate but I think we do not need to go to the length of solving that as it only concerns optimization, not miscompilation. (it is similar that we don't guarantee object files from older compiler to work with newer compiler due to potential ABI changes which may also be silent)

Thanks @jondegenhardt

…s.llvm.org/D79961

Note that we do not include versioning code for our PGO files: PGO files from older LDC versions are not guarantee to work with newer versions of LDC. The user will see warnings about different function hashes, so he is aware the profile is not applied for those functions. Hash clashes may occur (old version hash corresponding to different function newer version hash), which is unfortunate but I think we do not need to go to the length of solving that as it only concerns optimization, not miscompilation. (it is similar that we don't guarantee object files from older compiler to work with newer compiler due to potential ABI changes which may also be silent)
@JohanEngelen
Copy link
Member Author

Now with testcase fixup commit

@JohanEngelen JohanEngelen merged commit 10cf5f0 into master Jul 22, 2020
@JohanEngelen JohanEngelen deleted the fixPGOhash branch July 22, 2020 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants