[PATCH] D84717: [ADT][BitVector] Merge find_first_in() / find_first_unset_in()
Stefanos Baziotis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 28 02:14:23 PDT 2020
baziotis added a comment.
One proposal by a friend of mine, GeorgeLS <https://github.com/GeorgeLS>, is that we can make a wrapper in which instead of passing a `bool`, we pass a `BitWord`.
And then we XOR with this `BitWord` every `BitWord` we read from `Bits`. So, the passed `BitWord` acts conditionally. If we want the "unset" version, we pass `~0`.
If we want the "set" version, we pass `0`.
In that way, we can make the code unconditional. What do you think?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84717/new/
https://reviews.llvm.org/D84717
More information about the llvm-commits
mailing list