-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[BOLT] Provide backwards compatibility for YAML profile with std::hash #74253
Conversation
|
268cc19
to
c7c5bf9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we write a new field to YAML with a hash function name/ID? In the reader, we default to std::hash
for backwards compatibility as you already do. If we are not planning on using std::hash
in the future (for writing), perhaps the option is not needed at all? We can likely have a couple of binary/YAML test cases that verify backwards compatibility.
Suggestion for the title: "Provide backwards compatibility for YAML profile with std::hash".
Added a YAML test checking backwards compatibility. It reuses the test |
Renamed Xxh3 to XXH3. |
Summary: xxh3 hash is the default for newly produced profile (sets `hash-func: xxh3`), whereas the profile that doesn't specify `hash-func` will be treated as `hash-func: std-hash`, preserving old behavior.
Provide backwards compatibility for YAML profile that uses
std::hash
:xxh3 hash is the default for newly produced profile (sets
std-hash: false
),whereas the profile that doesn't specify
std-hash
will be treated asstd-hash: true
, preserving old behavior.Same as
profile-use-dfs
in https://reviews.llvm.org/D156176.