Commit Graph

20 Commits

Author SHA1 Message Date
Michael Munday
d3262ec10d [IRGen] Remove SetBitEnumerator from ClusteredBitVector
The change replaces 'set bit enumeration' with arithmetic
and bitwise operations. For example, the formula
'(((x & -x) + x) & x) ^ x' can be used to find the rightmost
contiguous bit mask. This is essentially the operation that
SetBitEnumerator.findNext() performed.

Removing this functionality reduces the complexity of the
ClusteredBitVector (a.k.a. SpareBitVector) implementation and,
more importantly, API which will make it easier to modify
the implementation of spare bit masks going forward. My end
goal being to make spare bit operations work more reliably on
big endian systems.

Side note:

This change modifies the emit gather/scatter functions so that
they work with an APInt, rather than a SpareBitVector, which
makes these functions a bit more generic. These functions emit
instructions that are essentially equivalent to the parallel bit
extract/deposit (PEXT and PDEP) instructions in BMI2 on x86_64
(although we don't emit those directly currently). They also map
well to bitwise manipulation instructions on other platforms (e.g.
RISBG on IBM Z). So we might find uses for them outside spare bit
manipulation in the future.
2019-05-17 11:55:06 +01:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Chris Lattner
821c2cb98f Merge pull request #1796 from danra/swift_basic_sanitize
Canonicalize swift header files headers and footers
2016-03-29 17:31:53 -07:00
Dmitri Gribenko
e9ab667e3a Merge pull request #1811 from danra/patch-21
move copy-append before move-append overload (NFC)
2016-03-25 00:51:27 -07:00
rjmccall
ea0d95ba5d Merge pull request #1808 from danra/patch-18
static_assert that ClusteredBitVector::ChunkType is unsigned instead of just commenting as much.
2016-03-24 00:28:07 -07:00
Chris Lattner
c153c3ab7d Merge pull request #1810 from danra/patch-20
[gardening] Improved comments (NFC)
2016-03-23 17:41:36 -07:00
Chris Lattner
9070697cce Merge pull request #1813 from danra/patch-22
Remove redundant parentheses (NFC)
2016-03-23 17:39:48 -07:00
danra
891dea4f70 Fix comment typo (NFC) 2016-03-24 00:45:02 +02:00
danra
fec14bfb9f Remove redundant parentheses (NFC) 2016-03-23 23:58:08 +02:00
danra
3ba34602e2 move copy-append before move-append overload
This is consistent with the usual convention of having copy methods before move methods (which is also used in this file in previous methods).
2016-03-23 23:54:57 +02:00
danra
7988864ab1 [gardening] Improved comments (NFC) 2016-03-23 23:39:37 +02:00
danra
98776388d4 Compact getCapacityInBits implementation (NFC) 2016-03-23 22:50:34 +02:00
danra
8134bfd55d static_assert ChunkType is unsigned 2016-03-23 22:26:16 +02:00
Dan Raviv
29d76f3b68 Canonize swift header files headers and footers
- Added missing ifdef guard in PointerIntEnum header
- Consistent naming convention for ifdef guards
- Consistent 'end namespace swift'
- Consistent single EOL at end of header files
2016-03-23 09:04:12 +02:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Johan K. Jensen
fa76656c82 Remove instances of duplicated words 2015-12-03 20:00:29 +01:00
Ben Langmuir
ef071c3cdc Update for LLVM API change r228930
CountPopulation_{32,64} => countPopulation
Count{Trailing,Leading}Ones_{32,64} => count{Trailing,Leading}Ones

Swift SVN r25239
2015-02-12 16:46:14 +00:00
John McCall
a7e2bb241b Fix some bit-vector bugs that weren't covered by my
random test generator and flesh out the API.

Swift SVN r24304
2015-01-09 10:05:43 +00:00
John McCall
05c67279fb Add a new bit-vector implementation optimized for
IRGen's needs.

Swift SVN r24295
2015-01-09 03:02:39 +00:00