summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__split_buffer
Commit message (Collapse)AuthorAgeFilesLines
* [libc++] Rework compressed pair constructors.Eric Fiselier2019-12-161-2/+2
| | | | | | | | | | | | This patch de-duplicates most compressed pair constructors to use the same code in C++11 and C++03. Part of doing that is deleting the "__second_tag()" and replacing it with a "__value_init_tag()" which has the same effect, but allows for the removal of the special "one-arg" first element constructor. This patch is intended to have no semantic change.
* Rename __is_foo_iterator traits to reflect their Cpp17 nature.Eric Fiselier2019-11-181-6/+6
| | | | | | | | | With the upcoming introduction of iterator concepts in ranges, the meaning of "__is_contiguous_iterator" changes drastically. Currently we intend it to mean "does it have this iterator category", but it could now also mean "does it meet the requirements of this concept", and these can be different.
* [libc++] Rename __to_raw_pointer to __to_address.Eric Fiselier2019-11-161-12/+12
| | | | | | | This function has the same behavior as the now-standand std::to_address. Re-using the name makes the behavior more clear, and in the future it will allow us to correctly get the raw pointer for user provided pointer types.
* Improve codegen for deque.Eric Fiselier2019-08-121-19/+26
| | | | | | | | | | | | | | | | | | | | | | | This patch rewrites a few loops in deque and split_buffer to better optimize the codegen. For constructors like `deque<unsigned char> d(500000, 0);` this patch results in a 2x speedup. The patch improves the codegen in roughly three ways: 1. Changes do { ... } while (...) loops into more typical for loops. The optimizer can reason about normal looking loops better. 2. Split the iteration over a range into (A) iteration over the blocks, then (B) iteration within the block. This nested structure helps LLVM lower the inner loop to `memset`. 3. Do fewer things each iteration. Some of these loops were incrementing or changing 4-5 variables every loop (in addition to the construction). Previously most loops would increment the end pointer, the size, and decrement the count of remaining items to construct. Now we only increment a single pointer for most iterations. llvm-svn: 368547
* [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on WindowsEric Fiselier2017-05-311-3/+6
| | | | | | | | | | | | | | | | Summary: This patch improves how libc++ handles min/max macros within the headers. Previously libc++ would undef them and emit a warning. This patch changes libc++ to use `#pragma push_macro` to save the macro before undefining it, and `#pragma pop_macro` to restore the macros and the end of the header. Reviewers: mclow.lists, bcraig, compnerd, EricWF Reviewed By: EricWF Subscribers: cfe-commits, krytarowski Differential Revision: https://reviews.llvm.org/D33080 llvm-svn: 304357
* Cleanup remaining _LIBCPP_HAS_NO_<c++11-feature> usages in container headersEric Fiselier2017-04-191-16/+10
| | | | llvm-svn: 300643
* Fix most failures caused by r300140Eric Fiselier2017-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | r300140 introduced a bunch of failures by changing the internal interface provided by __compressed_pair. This patch fixes all of the failures caused by the new interface by changing the existing code to use it. In addition to those changes this patch also fixes two separate issues causing test failures: 1) Fix the member swap definition for __map_value_compare. Previously the swap was incorrectly configured to swap the comparator as const. 2) Fix an assertion failure in futures.task.members/ctor_func_alloc.pass.cpp that incorrectly expected a move to take place when a single copy is sufficient. There is one remaining failure regarding make_shared. I'll commit a fix for that shortly. llvm-svn: 300148
* Cleanup: move visibility/linkage attributes to the first declaration.Evgeniy Stepanov2015-11-071-5/+10
| | | | | | | | | | | | This change moves visibility attributes from out-of-class method definitions to in-class declaration. This is needed for a switch to attribute((internal_linkage)) (see http://reviews.llvm.org/D13925) which can only appear on the first declaration. This change does not touch istream/ostream/streambuf. They are handled separately in http://reviews.llvm.org/D14409. llvm-svn: 252385
* Implement the first part of N4258: 'Cleaning up noexcept in the Library'. ↵Marshall Clow2015-07-131-20/+1
| | | | | | This patch deals with swapping containers, and implements a more strict noexcept specification (a conforming extension) than the standard mandates. llvm-svn: 242056
* G M: Changes all references to "x inline" to "inline x" where x = ↵Howard Hinnant2013-10-041-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | _libcpp_always_inline or _libcpp_inline_visibility macros. The patch touches these files: locale array deque new string utility vector __bit_reference __split_buffer locale_win32.h There is no intended functionality change and it is expected that reversing the position of the inline keyword with regard to the other keywords does not change the meaning of anything, least not for apple/Linux etc. It is intended to make libcxx more consistent with itself and to prevent the 1000 or so "inline.cpp(3) : warning C4141: 'inline' : used more than once" warnings that MS's cl.exe compiler emits without this patch, i.e. if inline is not the first keyword before a function name etc. Prefer "inline [other inline related keyword]" over "[other related keyword] inline". After this patch, libcxx should be consistent to this pattern. llvm-svn: 191987
* Implement full support for non-pointer pointers in custom allocators for deque.Howard Hinnant2013-06-231-6/+6
| | | | llvm-svn: 184673
* Revert accidental check-in. These changes are probably good, but premature ↵Howard Hinnant2013-02-071-2/+2
| | | | | | at this point. llvm-svn: 174625
* Michael van der Westhuizen: The attached patch add support for building ↵Howard Hinnant2013-02-071-2/+2
| | | | | | | | | | | against libc++abi and libcxxrt to CMake builds of libc++. Usage (with the appropriate CC and CXX environment variables) is: $ cmake -DLIBCXX_CXX_ABI=libcxxabi '-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=/home/michael/libcxxabi/include' ../libcxx and: $ cmake -DLIBCXX_CXX_ABI=libcxxrt '-DLIBCXX_LIBCXXRT_INCLUDE_PATHS=/home/michael/libcxxrt/src' ../libcxx llvm-svn: 174623
* Implement a few optimizations for vector push_back and insert. Fixes r10828365.Howard Hinnant2012-02-151-4/+6
| | | | llvm-svn: 150542
* Quash a whole bunch of warningsHoward Hinnant2011-12-011-7/+7
| | | | llvm-svn: 145624
* Further macro protection by replacing _[A-Z] with _[A-Z]pHoward Hinnant2011-11-291-2/+2
| | | | llvm-svn: 145410
* Add protection from min/max macrosHoward Hinnant2011-11-291-0/+2
| | | | llvm-svn: 145407
* Windows support by Ruben Van Boxem.Howard Hinnant2011-10-171-0/+2
| | | | llvm-svn: 142235
* Fix const correctness bug in __move_assign. Found and fixed by Ion Gaztañaga.Howard Hinnant2011-09-021-2/+2
| | | | llvm-svn: 139032
* __split_buffer should only require default constructible. Bug found and ↵Howard Hinnant2011-08-281-1/+1
| | | | | | fixed by Jared Hoberock llvm-svn: 138726
* _STD -> _VSTD to avoid macro clash on windowsHoward Hinnant2011-06-301-57/+57
| | | | llvm-svn: 134190
* After sleeping on it I've decided that all special members that can be ↵Howard Hinnant2011-06-031-1/+3
| | | | | | noexcept, should be declared so. The client has the traits to detect and branch on this information, and it is often an important optimization. Give deque() a noexcept. Add test for deque default constructor and deque destructor. llvm-svn: 132549
* I've become quite disatsified with the lack of noexcept specifications on ↵Howard Hinnant2011-06-021-21/+50
| | | | | | container move construction, move assignment operator and swap. Without proper decoration on at least move construction, vectors of containers will have unacceptable performance. Here's the fix for deque. llvm-svn: 132480
* Reverting an old optimization that conflicts with the new allocator model, ↵Howard Hinnant2011-01-041-39/+0
| | | | | | and causes some test casees to compile that shouldn't. llvm-svn: 122830
* Add CMake build and fix major Linux blockers.Michael J. Spencer2010-12-101-2/+4
| | | | llvm-svn: 121510
* N3142. Many of these traits are just placeholders with medium quality ↵Howard Hinnant2010-11-191-4/+4
| | | | | | emulation; waiting on compiler intrinsics to do it right. llvm-svn: 119854
* visibility-decoration.Howard Hinnant2010-09-211-0/+6
| | | | llvm-svn: 114470
* Changed __config to react to all of clang's currently documented has_feature ↵Howard Hinnant2010-09-041-10/+14
| | | | | | flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature. llvm-svn: 113086
* Fixing whitespace problemsHoward Hinnant2010-08-221-8/+8
| | | | llvm-svn: 111750
* First loop test passed. The data structure and search algorithm is still ↵Howard Hinnant2010-07-071-3/+3
| | | | | | crude and in-flux. But this milestone needed to be locked in. Right now every loop is implemented in terms of a structure that will handle the most complicated {min, max} loop. Though only *-loops are tested at the moment. In a future iteration *-loops will likely be optimized a little more. The only tests are for basic posix so far, but I have prototype code running for extended posix and ecma. The prototype code lacks the complicating properties of the real <regex> requirements though. llvm-svn: 107803
* [rand.dist.bern.bin]. The evaluation function for this binomial ↵Howard Hinnant2010-05-111-2/+0
| | | | | | distribution is hopefully just a placeholder. It is using the simplest and slowest method for computing the distribution and needs to be upgraded. llvm-svn: 103524
* libcxx initial importHoward Hinnant2010-05-111-0/+646
llvm-svn: 103490
OpenPOWER on IntegriCloud