History log of /llvm-project/llvm/unittests/ADT/BitVectorTest.cpp (Results 26 – 50 of 52)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 7500b0ec 20-Apr-2017 Zachary Turner <zturner@google.com>

[BitVector] Add operator<<= and operator>>=.

Differential Revision: https://reviews.llvm.org/D32244

llvm-svn: 300848


# c7da1ce3 10-Apr-2017 Zachary Turner <zturner@google.com>

Fix signed / unsigned comparison warnings.

llvm-svn: 299873


# 843171f3 10-Apr-2017 Zachary Turner <zturner@google.com>

[Support] Add support for finding unset bits in a BitVector.

BitVector had methods for searching for the first and next
set bits, but it did not have analagous methods for finding
the first and next

[Support] Add support for finding unset bits in a BitVector.

BitVector had methods for searching for the first and next
set bits, but it did not have analagous methods for finding
the first and next unset bits. This is useful when your ones
and zeros are grouped together and you want to iterate over
ranges of ones and zeros.

Differential Revision: https://reviews.llvm.org/D31802

llvm-svn: 299857

show more ...


Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2
# 617a1994 23-Jan-2017 Matthias Braun <matze@braunis.de>

Add unittests for empty bitvectors.

Addendum to r292575

llvm-svn: 292817


Revision tags: llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1, llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2, llvmorg-3.9.0-rc1
# 660b1a49 16-Jun-2016 Evgeniy Stepanov <eugeni.stepanov@gmail.com>

Fix BitVector move ctor/assignment.

Current implementation leaves the object in an invalid state.

This reverts commit bf0c389ac683cd6c0e5959b16537e59e5f4589e3.

llvm-svn: 272965


Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1, llvmorg-3.8.0, llvmorg-3.8.0-rc3, llvmorg-3.8.0-rc2, llvmorg-3.8.0-rc1, llvmorg-3.7.1, llvmorg-3.7.1-rc2, llvmorg-3.7.1-rc1
# a89b833c 18-Sep-2015 Yaron Keren <yaron.keren@gmail.com>

Simplify SmallBitVector::applyMask by consolidating common code for 32- and 64-bit builds
and assert when mask is too large to apply in the small case,
previously the extra words were silently ignore

Simplify SmallBitVector::applyMask by consolidating common code for 32- and 64-bit builds
and assert when mask is too large to apply in the small case,
previously the extra words were silently ignored.
clang-format the entire function to match current code standards.

This is a rewrite of r247972 which was reverted in r247983 due to
warning and possible UB on 32-bits hosts.

llvm-svn: 247993

show more ...


# eda0a48e 18-Sep-2015 Aaron Ballman <aaron@aaronballman.com>

Reverting r247972 (and subordinate commit r247972) as the 32-bit left-shift is undefined behavior on implementations where uinptr_t is 32-bits. One such platform is Windows, MSVC, x86.

llvm-svn: 247

Reverting r247972 (and subordinate commit r247972) as the 32-bit left-shift is undefined behavior on implementations where uinptr_t is 32-bits. One such platform is Windows, MSVC, x86.

llvm-svn: 247983

show more ...


# 8c3142b5 18-Sep-2015 Yaron Keren <yaron.keren@gmail.com>

Fix BitVectorTest on 32-bit hosts after r247972.
We can't apply two words of 32-bit mask in the small case
where the internal storage is just one 32-bit word.

llvm-svn: 247974


# 733ccaab 18-Sep-2015 Yaron Keren <yaron.keren@gmail.com>

Simplify SmallBitVector::applyMask by consolidating common code for 32-bit and 64-bit builds.
Extend mask value to 64 bits before taking its complement and assert when mask is
too large to apply in t

Simplify SmallBitVector::applyMask by consolidating common code for 32-bit and 64-bit builds.
Extend mask value to 64 bits before taking its complement and assert when mask is
too large to apply in the small case (previously the extra words were silently ignored).

http://reviews.llvm.org/D11890

Patch by James Touton!

llvm-svn: 247972

show more ...


Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4, llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1, llvmorg-3.6.2, llvmorg-3.6.2-rc1, llvmorg-3.6.1, llvmorg-3.6.1-rc1, llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1, llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3, llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1, llvmorg-3.4.2, llvmorg-3.4.2-rc1, llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1, llvmorg-3.4.0
# 386328f9 19-Dec-2013 Anna Zaks <ganna@apple.com>

Fix a buffer overrun detected by AddressSanitizer.

llvm-svn: 197647


Revision tags: llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1
# 05b5a46e 26-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com>

Revert "[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc."

This reverts commit r187248. It broke many bots.

llvm-svn: 187254


# 419f7c23 26-Jul-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com>

[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc.

Both GCC and LLVM will implicitly define __ppc__ and __powerpc__ for
all PowerPC targets, whether 32- or 64-bit. They will both im

[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc.

Both GCC and LLVM will implicitly define __ppc__ and __powerpc__ for
all PowerPC targets, whether 32- or 64-bit. They will both implicitly
define __ppc64__ and __powerpc64__ for 64-bit PowerPC targets, and not
for 32-bit targets. We cannot be sure that all other possible
compilers used to compile Clang/LLVM define both __ppc__ and
__powerpc__, for example, so it is best to check for both when relying
on either inside the Clang/LLVM code base.

This patch makes sure we always check for both variants. In addition,
it fixes one unnecessary check in lib/Target/PowerPC/PPCJITInfo.cpp.
(At least one of __ppc__ and __powerpc__ should always be defined when
compiling for a PowerPC target, no matter which compiler is used, so
testing for them is unnecessary.)

There are some places in the compiler that check for other variants,
like __POWERPC__ and _POWER, and I have left those in place. There is
no need to add them elsewhere. This seems to be in Apple-specific
code, and I won't take a chance on breaking it.

There is no intended change in behavior; thus, no test cases are
added.

llvm-svn: 187248

show more ...


# 1c7fcccb 11-Jul-2013 Benjamin Kramer <benny.kra@googlemail.com>

Sync SmallBitVector with BitVector. Add unit tests for the missing methods.

llvm-svn: 186123


Revision tags: llvmorg-3.3.1-rc1
# 9675a0db 07-Jun-2013 Benjamin Kramer <benny.kra@googlemail.com>

BitVector: Do the right thing in all() when Size is a multiple of BITWORD_SIZE.

llvm-svn: 183525


# 2566e049 07-Jun-2013 Benjamin Kramer <benny.kra@googlemail.com>

Optimize BitVector::all().

llvm-svn: 183521


Revision tags: llvmorg-3.3.0, llvmorg-3.3.0-rc3, llvmorg-3.3.0-rc2, llvmorg-3.3.0-rc1, llvmorg-3.2.0, llvmorg-3.2.0-rc3, llvmorg-3.2.0-rc2, llvmorg-3.2.0-rc1
# 04b8daa9 16-Oct-2012 Owen Anderson <resistor@mac.com>

Fix a bug in the set(I,E)/reset(I,E) methods that I recently added. The boundary condition for checking if I and E were in the same word were incorrect, and, beyond that, the mask computation was no

Fix a bug in the set(I,E)/reset(I,E) methods that I recently added. The boundary condition for checking if I and E were in the same word were incorrect, and, beyond that, the mask computation was not using a wide enough constant.

llvm-svn: 166015

show more ...


# 6b7bdf88 15-Oct-2012 Owen Anderson <resistor@mac.com>

Add range-based set()/reset() to BitVector. These allow fast setting/resetting of ranges of bits, particularly useful when dealing with very large BitVector's.

llvm-svn: 165984


# 34d6a9e5 16-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com>

Merge the SmallBitVector and BitVector unit tests with gtest's typed test magic and bring SmallBitVector up to date.

llvm-svn: 158600


# 77e7b8ed 14-May-2012 Jakob Stoklund Olesen <stoklund@2pi.dk>

Remove the expensive BitVector::operator~().

Returning a temporary BitVector is very expensive. If you must, create
the temporary explicitly: Use BitVector(A).flip() instead of ~A.

llvm-svn: 156768


# 2fad493f 14-May-2012 Jakob Stoklund Olesen <stoklund@2pi.dk>

Add BitVector::anyCommon().

The existing operation (A & B).any() is very slow.

llvm-svn: 156760


Revision tags: llvmorg-3.1.0, llvmorg-3.1.0-rc3, llvmorg-3.1.0-rc2, llvmorg-3.1.0-rc1
# 6ccbdcda 17-Jan-2012 Jakob Stoklund Olesen <stoklund@2pi.dk>

Add portable bit mask operations to BitVector.

BitVector uses the native word size for its internal representation.
That doesn't work well for literal bit masks in source code.

This patch adds BitV

Add portable bit mask operations to BitVector.

BitVector uses the native word size for its internal representation.
That doesn't work well for literal bit masks in source code.

This patch adds BitVector operations to efficiently apply literal bit
masks specified as arrays of uint32_t. Since each array entry always
holds exactly 32 bits, these portable bit masks can be source code
literals, probably produced by TableGen.

llvm-svn: 148272

show more ...


Revision tags: llvmorg-3.0.0, llvmorg-3.0.0-rc4, llvmorg-3.0.0-rc3, llvmorg-3.0.0-rc2, llvmorg-3.0.0-rc1, llvmorg-2.9.0, llvmorg-2.9.0-rc3, llvmorg-2.9.0-rc2, llvmorg-2.9.0-rc1, llvmorg-2.8.0, llvmorg-2.8.0-rc3
# b179cb2c 27-Sep-2010 Dan Gohman <gohman@apple.com>

Add an all() method to BitVector, for testing whether all bits are set.

llvm-svn: 114830


Revision tags: llvmorg-2.8.0-rc2, llvmorg-2.8.0-rc1, llvmorg-2.8.0-rc0
# b74155db 30-Apr-2010 Dan Gohman <gohman@apple.com>

Update BitVectorTest.cpp to stay in sync with SmallBitVectorTest.cpp,
and fix a bug in BitVector's reference proxy class which this exposed.

llvm-svn: 102768


Revision tags: llvmorg-2.7.0
# 4b86e9b7 10-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com>

Silence GCC warnings.

llvm-svn: 95779


# e69b99ba 10-Feb-2010 Dan Gohman <gohman@apple.com>

Implement operators |=, &=, and ^= for SmallBitVector, and remove the
restriction in BitVector for |= and ^= that the operand must be the
same length.

llvm-svn: 95768


123