Draft
Conversation
This enforces the use of the constructor of bv_varidt, instead of assigning to the fields after default initialisation.
This adds a 'next' member to bv_varidt.
dad63eb to
e8b7111
Compare
tautschnig
reviewed
Jan 12, 2026
| size_t operator()(const bv_varidt &bv_varid) const | ||
| { return hash_string(bv_varid.id)^bv_varid.bit_nr; } | ||
| { | ||
| return hash_string(bv_varid.id) ^ bv_varid.bit_nr ^ bv_varid.next; |
Collaborator
There was a problem hiding this comment.
Should this perhaps use the hash function helpers from irep_hash.h instead of naively XOR-ing values? bit_nr will only ever have some of the least-significant bits set, and next will only ever be 0 or 1. Alas, only id will make use of all bits, while the other two will only ever affect a small subset of the bits. In contrast, hash_combine would take care of rotating and distributing bits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a
nextmember tobv_varidt.