This patch renames the cxx-benchmark-unittests to check-cxx-benchmarks
and converts the target to use LIT in order to make the tests run faster
and provide better output.
In particular this runs each benchmark in a suite one by one, allowing
more parallelism while ensuring output isn't garbage with multiple threads.
Additionally, it adds the CMake flag '-DLIBCXX_BENCHMARK_TEST_ARGS=<list>'
to specify what options are passed when running the benchmarks.
llvm-svn: 346888
Summary:
The result of subprocess.check_output() is bytes in python3 which we need
to convert to str(). Simplify this by using the executeCommand() helper.
Reviewers: ldionne, EricWF
Reviewed By: ldionne
Subscribers: christof, libcxx-commits
Differential Revision: https://reviews.llvm.org/D54522
llvm-svn: 346878
This is needed when cross-compiling for a different target since
CFLAGS may contain additional flags like -resource-dir which
change the location in which compiler-rt builtins are found.
Differential Revision: https://reviews.llvm.org/D54371
llvm-svn: 346820
This patch adds the cxx-benchmark-unittests target so we can start
getting test coverage on the benchmarks, including building with
sanitizers. Because we're only looking for test-coverage, the benchmarks
run for the shortest time possible, and in parallel.
The target is excluded from all by default. It only
builds and runs the libcxx configurations of the benchmarks, and not
any versions built against the systems native standard library.
llvm-svn: 346811
The usage of aligned_storage failed to pass the alignment it wanted,
which caused it to have a larger size and alignment that the
std::string's it was intended to store.
This patch manually specifies the alignment, as well as cleaning up
type alias bugs.
llvm-svn: 346779
Summary:
P1006 adds support for constexpr in the specialization of pointer_traits
for raw pointers. This is necessary in order to use pointer_traits in
the upcoming constexpr containers. We expect P1006 to be voted into the
working draft for C++20 at the San Diego meeting.
Reviewers: mclow.lists, EricWF
Subscribers: christof, dexonsmith, libcxx-commits
Differential Revision: https://reviews.llvm.org/D53867
llvm-svn: 346764
The benchmarks currently require C++17, however Clang 3.9 doesn't
support -std=c++17 while still supporting all the C++17 features needed
to compile the benchmarks.
This patch makes the benchmark build attempt to fall back to -std=c++1z
when -std=c++17 isn't supported.
See llvm.org/PR39629
llvm-svn: 346744
This patch adds tests to ensure that multiset/unordered_multiset's emplace
method correctly constructs the elements without any intervening
constructions.
llvm-svn: 346743
shared_mutex was introduced in C++17 but its implementation currently
doesn't use Clang's thread annotations like regular mutex. This change
adds those.
Differential Revision: https://reviews.llvm.org/D54290
llvm-svn: 346567
Summary:
This fixes an regression when using bionic introduced in r345173.
I need to follow up and figure out what exactly is implied by
TEST_HAS_C11_FEATURES and see what the correct configuration is for
bionic (new versions should have everything the tests care about,
versions that predate C11 certainly don't), but this gets the tests
back to the old behavior.
Reviewers: EricWF
Reviewed By: EricWF
Subscribers: mclow.lists, christof, ldionne, libcxx-commits, cfe-commits
Differential Revision: https://reviews.llvm.org/D53956
llvm-svn: 345900
This reverts r345525. I'm reverting because that patch apparently caused
a regression on certain platforms (see https://reviews.llvm.org/D53994).
Since we don't fully understand the reasons for the regression, I'm
reverting until we can provide a fix we understand.
llvm-svn: 345893
Summary:
This silences the two -Wimplicit-fallthrough warnings clang finds in
ItaniumDemangle.h in libc++abi.
Clang does not have a GNU attribute spelling for this attribute, so this
is necessary.
I will commit the same change to the LLVM demangler soon.
Reviewers: EricWF, ldionne
Subscribers: christof, erik.pilkington, cfe-commits
Differential Revision: https://reviews.llvm.org/D53985
llvm-svn: 345870
This commit adds a merge member function to all the map and set containers,
which splices nodes from the source container. This completes support for
P0083r3.
Differential revision: https://reviews.llvm.org/D48896
llvm-svn: 345744
Summary:
This change changes the build to use -fvisibility=hidden
The exports this patch removes are symbols that should have never been exported
by the dylib in the first place, and should all be symbols which the linker
won't de-duplicate across SO boundaries, making them safe to remove.
After this change, we should be able to apply `_LIBCPP_HIDDEN` to the versioning namespace without changing the export lists.
Reviewers: ldionne, mclow.lists
Reviewed By: ldionne
Subscribers: smeenai, mgorny, libcxx-commits
Differential Revision: https://reviews.llvm.org/D53868
llvm-svn: 345664
Summary:
This patch makes the versioning namespace libc++ uses customizable by the user using `-DLIBCXX_ABI_NAMESPACE=__foo`.
This allows users to build custom versions of libc++ which can be linked into binaries with other libc++ versions without causing symbol conflicts or ODR issues.
Reviewers: mclow.lists, ldionne
Reviewed By: ldionne
Subscribers: kristina, smeenai, mgorny, phosek, libcxx-commits
Differential Revision: https://reviews.llvm.org/D53879
llvm-svn: 345657
Summary:
Added benchmarks for Construct, Copy, Move, Destroy, Relationals and
Read. On the ones that matter, the benchmarks tests hot and cold data,
and opaque and transparent inputs.
Reviewers: EricWF
Subscribers: christof, ldionne, libcxx-commits
Differential Revision: https://reviews.llvm.org/D53825
llvm-svn: 345611
Summary:
This commit adopts the exclude_from_explicit_instantiation attribute discussed
at [1] and reviewed in [2] in libc++ to supplant the use of __always_inline__
for visibility purposes.
This change means that users wanting to link together translation units built
with different versions of libc++'s headers into the same final linked image
MUST define the _LIBCPP_HIDE_FROM_ABI_PER_TU macro to 1 when building those
TUs. Doing otherwise will lead to ODR violations and ABI issues.
[1]: http://lists.llvm.org/pipermail/cfe-dev/2018-August/059024.html
[2]: https://reviews.llvm.org/D51789
Reviewers: rsmith, EricWF
Subscribers: dexonsmith, libcxx-commits
Differential Revision: https://reviews.llvm.org/D52405
llvm-svn: 345516