| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
suite on Linux.
There are a few tests that are listed as failing here for which I have
a patch in the works. I'll be sending those along soon. There are
others where I know what is going on but don't yet have a solution,
and I've included some notes for those. Several still need to be
investigated, mostly in localization and the regex test suite. I think
that many of these failures are due to locale implementation
variations that make the expected test results not match the actual
results. I'm not sure what the best way to make the tests accomodate
this sort of variation might be.
The failures in the unique_ptr test suite are very new and are caused
by a clang crash which I've not yet looked into.
llvm-svn: 161079
|
| |
|
|
|
|
| |
I've put a small spin in __sp_mut::lock() on std::mutex::try_lock(), which is testing quite well. In my experience, putting in a yield for every failed iteration is also a major performance booster. This change makes one of the performance tests I was using (a highly contended one) run about 20 times faster.
llvm-svn: 160967
|
| |
|
|
| |
llvm-svn: 160959
|
| |
|
|
| |
llvm-svn: 160943
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
section in libc++. This requires a recompiled dylib. Failure to rebuild
the dylib will result in a link-time error if and only if the functions from
[util.smartptr.shared.atomic] are used.
The implementation is not lock free. After considerable thought, I know of no
way to make the implementation lock free. Ideas welcome along that front. But
changing the ABI of shared_ptr is not on the table at this point.
The mutex used to lock these function is encapsulated by std::__sp_mut. The
only thing the client knows about std::__sp_mut is that it has a void* data
member, can't be constructed, and has lock and unlock members. Within the
binary __sp_mut is currently implemented as a pointer to a std::mutex. That can
change in the future without disturbing the ABI (as long as sizeof(__sp_mut)
remains constant.
I specifically did not make __sp_mut a spin lock as I have a pathological
distrust of spin locks. Testing on OS X reveals that the use of std::mutex in
this role is not a large performance penalty as long as the contention for the
mutex is low (more likely to get the lock than to have to wait). In the future
we can still make __sp_mut a spin lock if that is what is desired (without ABI
damage).
The dylib contains 16 __sp_mut's to be chosen based on the hash of the address
of the shared_ptr. The constant 16 is a ball-park reasonable space/time
tradeoff.
std::hash<T*> was changed to call __murmur2_or_cityhash, instead of the identity
function. I had thought we had already done this, but I was mistaken.
All of this is under #if __has_feature(cxx_atomic) even though the
implementation is not lock free, because the signatures require access to
std::memory_order, which is currently available only under
__has_feature(cxx_atomic).
llvm-svn: 160940
|
| |
|
|
| |
llvm-svn: 160812
|
| |
|
|
|
|
|
|
|
| |
linux. On my eglibc 2.13 based Debian system 'getc' is a macro defined in
/usr/include/stdio.h. This decision to make it a macro doesn't seem to
be guarded by any feature test macro as far as I can see.
llvm-svn: 160799
|
| |
|
|
|
|
|
|
|
|
|
|
| |
typeinfo.cpp. Both new.cpp and typeinfo.cpp have code that is conditionally compiled
based on the LIBCXXRT and _LIBCPPABI_VERSION defines, but those files
do not currently include <cxxabi.h> in the non __APPLE__ case. The
attached patch updates those files so that for non __APPLE__ builds
<cxxabi.h> is included if available or if LIBCXXRT is set. I'm
modeling this on the recent updates to exception.cpp.
llvm-svn: 160790
|
| |
|
|
|
|
| |
<cstddef>. This was brought to my attention by Salvatore Benedetto in his port to a bare-metal coretex-m3. This exposed two test bugs where an explicit #include <cstdlib> was needed.
llvm-svn: 160786
|
| |
|
|
| |
llvm-svn: 160785
|
| |
|
|
|
|
| |
platform-provided macro on some systems) to _LIBCPP_NORETURN.
llvm-svn: 160773
|
| |
|
|
|
|
| |
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3318.html#2067 . This is the only actionable change that has been made to the C++ draft since C++11. In general it has not been decided exactly how libc++ will track changes made to C++11. New features and design changes will probably be #ifdef'd, especially if they are not backwards compatible. Defects and 'dumb mistakes' are more likely to just be put in. Decisions on telling one from the other will be made on a case by case basis.
llvm-svn: 160608
|
| |
|
|
| |
llvm-svn: 160607
|
| |
|
|
| |
llvm-svn: 160606
|
| |
|
|
| |
llvm-svn: 160605
|
| |
|
|
| |
llvm-svn: 160604
|
| |
|
|
| |
llvm-svn: 160594
|
| |
|
|
| |
llvm-svn: 160593
|
| |
|
|
| |
llvm-svn: 160592
|
| |
|
|
| |
llvm-svn: 160585
|
| |
|
|
| |
llvm-svn: 160579
|
| |
|
|
| |
llvm-svn: 160566
|
| |
|
|
| |
llvm-svn: 160565
|
| |
|
|
| |
llvm-svn: 160564
|
| |
|
|
| |
llvm-svn: 160563
|
| |
|
|
| |
llvm-svn: 160562
|
| |
|
|
| |
llvm-svn: 160510
|
| |
|
|
|
|
| |
in C++ standard status.
llvm-svn: 160509
|
| |
|
|
|
|
| |
Args...> to only check Fp, and not Args... . This should be sufficient to give the desired high quality diagnostics under both bind and function. And this allows a test reported by Rich E on cfe-dev to pass. Tracked by <rdar://problem/11880602>.
llvm-svn: 160285
|
| |
|
|
| |
llvm-svn: 160184
|
| |
|
|
|
|
| |
Jonathan Coxhead for reporting this bug.
llvm-svn: 160136
|
| |
|
|
| |
llvm-svn: 160038
|
| |
|
|
| |
llvm-svn: 159921
|
| |
|
|
|
|
| |
before any changes to the container are made. Nikolay Ivchenkov deserves the credit for pushing this problem and the solution for it.
llvm-svn: 159918
|
| |
|
|
| |
llvm-svn: 159902
|
| |
|
|
|
|
| |
constexpr to the condition_variable constructor. These are important because it enables the compiler to construct these types at compile time, even though the object will be non-const. Since they are constructed at compile time, there is no chance of a data race before they are constructed.
llvm-svn: 159901
|
| |
|
|
| |
llvm-svn: 159899
|
| |
|
|
| |
llvm-svn: 159865
|
| |
|
|
|
|
| |
conditionalized on its held types.
llvm-svn: 159858
|
| |
|
|
| |
llvm-svn: 159857
|
| |
|
|
| |
llvm-svn: 159852
|
| |
|
|
|
|
| |
extension.
llvm-svn: 159850
|
| |
|
|
|
|
| |
extension.
llvm-svn: 159849
|
| |
|
|
| |
llvm-svn: 159846
|
| |
|
|
|
|
| |
containers: The policy now allows a power-of-2 number of buckets to be requested (and that request honored) by the client. And if the number of buckets is set to a power of 2, then the constraint of the hash to the number of buckets uses & instead of %. If the client does not specify a number of buckets, then the policy remains unchanged: a prime number of buckets is selected. The growth policy is that the number of buckets is roughly doubled when needed. While growing, either the prime, or the power-of-2 strategy will be preserved. There is a small run time cost for putting in this switch. For very cheap hash functions, e.g. identity for int, the cost can be as high as 18%. However with more typical use cases, e.g. strings, the cost is in the noise level. I've measured cases with very cheap hash functions (int) that using a power-of-2 number of buckets can make look up about twice as fast. However I've also noted that a power-of-2 number of buckets is more susceptible to accidental catastrophic collisions. Though I've also noted that accidental catastrophic collisions are also possible when using a prime number of buckets (but seems far less likely). In short, this patch adds an extra tuning knob for those clients trying to get the last bit of performance squeezed out of their hash containers. Casual users of the hash containers will not notice the introduction of this tuning knob. Those clients who swear by power-of-2 hash containers can now opt-in to that strategy. Clients who prefer a prime number of buckets can continue as they have.
llvm-svn: 159836
|
| |
|
|
| |
llvm-svn: 159791
|
| |
|
|
| |
llvm-svn: 159359
|
| |
|
|
|
|
| |
only mainly because result_of is a variadic beast and working with variadics is just such a problem in C++03 mode. This should bring result_of up to full conformance with the C++11 spec.
llvm-svn: 159211
|
| |
|
|
| |
llvm-svn: 159177
|
| |
|
|
|
|
| |
is_constructible. This should pull things into alignment with the final draft. Fixes http://llvm.org/bugs/show_bug.cgi?id=13063#add_comment.
llvm-svn: 158280
|