[PATCH] D116522: [ValueTracking][SelectionDAG] Rename ComputeMinSignedBits->ComputeMaxSignificantBits. NFC
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 4 06:03:53 PST 2022
spatel added a comment.
In D116522#3219081 <https://reviews.llvm.org/D116522#3219081>, @foad wrote:
>> Rename APInt::getMinSignedBits->getSignificantBits
>
> Why drop "Signed" from the name? Now we have `getActiveBits` for the unsigned version of this functionality and `getSignificantBits` for the signed version, which I don't think is very intuitive.
Good point. So we should standardize on either "active" or "significant". Go with "active" since it already exists and is shorter?
We could also standardize the verb in these names. Currently, it is "get", "count", or "compute".
If we unify those, it could be something like this across all of these APIs:
get[Max]ActiveBitsSigned()
get[Max]ActiveBitsUnsigned()
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116522/new/
https://reviews.llvm.org/D116522
More information about the llvm-commits
mailing list