mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-30 19:55:11 +00:00
Use NumBaseBits in a few more places in SmallBitVector instead of recalculating it. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177142 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7a86ffb19f
commit
d455d4f457
@ -178,9 +178,9 @@ public:
|
||||
unsigned count() const {
|
||||
if (isSmall()) {
|
||||
uintptr_t Bits = getSmallBits();
|
||||
if (sizeof(uintptr_t) * CHAR_BIT == 32)
|
||||
if (NumBaseBits == 32)
|
||||
return CountPopulation_32(Bits);
|
||||
if (sizeof(uintptr_t) * CHAR_BIT == 64)
|
||||
if (NumBaseBits == 64)
|
||||
return CountPopulation_64(Bits);
|
||||
llvm_unreachable("Unsupported!");
|
||||
}
|
||||
@ -215,9 +215,9 @@ public:
|
||||
uintptr_t Bits = getSmallBits();
|
||||
if (Bits == 0)
|
||||
return -1;
|
||||
if (sizeof(uintptr_t) * CHAR_BIT == 32)
|
||||
if (NumBaseBits == 32)
|
||||
return CountTrailingZeros_32(Bits);
|
||||
if (sizeof(uintptr_t) * CHAR_BIT == 64)
|
||||
if (NumBaseBits == 64)
|
||||
return CountTrailingZeros_64(Bits);
|
||||
llvm_unreachable("Unsupported!");
|
||||
}
|
||||
@ -233,9 +233,9 @@ public:
|
||||
Bits &= ~uintptr_t(0) << (Prev + 1);
|
||||
if (Bits == 0 || Prev + 1 >= getSmallSize())
|
||||
return -1;
|
||||
if (sizeof(uintptr_t) * CHAR_BIT == 32)
|
||||
if (NumBaseBits == 32)
|
||||
return CountTrailingZeros_32(Bits);
|
||||
if (sizeof(uintptr_t) * CHAR_BIT == 64)
|
||||
if (NumBaseBits == 64)
|
||||
return CountTrailingZeros_64(Bits);
|
||||
llvm_unreachable("Unsupported!");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user