Commit Graph

13421 Commits

Author SHA1 Message Date
Louis Dionne
a47cb9b652 [libc++] Fix number of characters in skip reason on BuildKite 2025-10-10 12:26:07 -04:00
Connector Switch
21b2bdd91c [libcxx][NFC] Added libunwind to LLVM_ENABLE_RUNTIMES for Windows… (#162682)
… builds using MinGW.

I tried running the original command, but the error told me I had to
include libunwind.
2025-10-10 22:58:41 +08:00
Nikolas Klauser
8ad5a21790 [libc++] Fix %{temp} replacements when running benchmarks 2025-10-10 12:08:26 +02:00
Louis Dionne
c8afc6a12d [libc++] Fix a few incorrect find-and-replace in the %{temp} change 2025-10-09 21:17:28 -04:00
Aiden Grossman
0c2913afc8 [libcxx] Use %{temp} instead of %T (#162323)
Based on review feedback in #160026.

This makes the substitution a lot more clear now that there is no
documentation around %T.

---------

Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
2025-10-09 16:52:42 -07:00
NagaChaitanya Vellanki
9146ef5df0 [libc++][string] Assert resize_and_overwrite operation returns integer-like type (#162030)
Verify that the operation passed to resize_and_overwrite returns an
integer-like type, matching the behavior of other standard library
implementations like GCC's libstdc++

Fixes #160577
2025-10-10 07:32:50 +08:00
Louis Dionne
5ba3b52306 [libc++] Skip AIX build jobs until #162516 has been resolved (#162664) 2025-10-09 15:23:59 +00:00
Ed Maste
92266681bf [libc++] Add FreeBSD libc++ owner (#162561)
Fixes #160091
2025-10-09 09:55:27 -04:00
Louis Dionne
4f80c064eb [runtimes][NFC] Consistently declare main() functions in tests (#162548)
In the libc++ test suite, we consistently declare main() functions with
full parameters and explicitly return from the function. This helps code
that compiles the tests with -ffreestanding, where main() is not a
special function (with an implicit return and special mangling).

This patch fixes a few stray declarations, including in libunwind and
libc++abi.
2025-10-09 09:00:20 -04:00
A. Jiang
d6d5026b51 [libc++] Avoid transitive inclusion for <__algorithm/find.h> (#162508)
Currently, `size_t` and `__libcpp_is_constant_evaluated` are obtained by
transitive inclusion in `<__algorithm/find.h>` when `<cwchar>` is not
included. This broke module build when `_LIBCPP_HAS_WIDE_CHARACTERS` is
`1` and caused CI failure. We should explicitly include the
corresponding internal headers.
2025-10-09 17:57:59 +08:00
Nikolas Klauser
446d950524 [libc++] Use std::__{scope,exception}_guard throughout the code base (#161322)
This simplifies the code quite a bit and seems to improve code size
slightly in some cases.
2025-10-09 09:32:40 +02:00
Nikolas Klauser
1760206383 [libc++] Remove availability annotations that aren't required anymore (#161640)
Apple dropped support for some older platforms, so we can also remove
the annotations for them.
See https://developer.apple.com/support/xcode/ for the supported
versions.
2025-10-09 08:46:02 +02:00
Nikolas Klauser
45f224d3f0 [libc++] Optimize {set,map}::{lower,upper}_bound (#161366)
Apple M4:
```
Benchmark                                                                                        Baseline    Candidate    Difference    % Difference
---------------------------------------------------------------------------------------------  ----------  -----------  ------------  --------------
std::map<int,_int>::lower_bound(key)_(existent)/0                                                    0.01         0.01         -0.00          -25.78
std::map<int,_int>::lower_bound(key)_(existent)/1024                                                 7.94         4.28         -3.66          -46.09
std::map<int,_int>::lower_bound(key)_(existent)/32                                                   2.73         1.69         -1.03          -37.89
std::map<int,_int>::lower_bound(key)_(existent)/8192                                                11.63         5.52         -6.11          -52.55
std::map<int,_int>::lower_bound(key)_(non-existent)/0                                                0.28         0.28         -0.00           -1.35
std::map<int,_int>::lower_bound(key)_(non-existent)/1024                                            17.21         7.63         -9.58          -55.67
std::map<int,_int>::lower_bound(key)_(non-existent)/32                                               4.71         3.26         -1.45          -30.71
std::map<int,_int>::lower_bound(key)_(non-existent)/8192                                            26.82        10.58        -16.24          -60.55
std::map<int,_int>::upper_bound(key)_(existent)/0                                                    0.01         0.01          0.00           20.62
std::map<int,_int>::upper_bound(key)_(existent)/1024                                                 7.93         3.61         -4.32          -54.49
std::map<int,_int>::upper_bound(key)_(existent)/32                                                   2.83         1.98         -0.85          -30.01
std::map<int,_int>::upper_bound(key)_(existent)/8192                                                11.69         5.72         -5.97          -51.06
std::map<int,_int>::upper_bound(key)_(non-existent)/0                                                0.28         0.28         -0.00           -1.36
std::map<int,_int>::upper_bound(key)_(non-existent)/1024                                            17.21         8.00         -9.21          -53.53
std::map<int,_int>::upper_bound(key)_(non-existent)/32                                               4.70         2.93         -1.78          -37.76
std::map<int,_int>::upper_bound(key)_(non-existent)/8192                                            26.54        11.18        -15.36          -57.89
std::map<std::string,_int>::lower_bound(key)_(existent)/0                                            0.04         0.04         -0.00           -3.26
std::map<std::string,_int>::lower_bound(key)_(existent)/1024                                        27.46        26.25         -1.22           -4.43
std::map<std::string,_int>::lower_bound(key)_(existent)/32                                          19.17        15.71         -3.46          -18.07
std::map<std::string,_int>::lower_bound(key)_(existent)/8192                                        35.33        35.03         -0.30           -0.84
std::map<std::string,_int>::lower_bound(key)_(non-existent)/0                                        0.27         0.27         -0.00           -1.45
std::map<std::string,_int>::lower_bound(key)_(non-existent)/1024                                    24.88        24.17         -0.70           -2.83
std::map<std::string,_int>::lower_bound(key)_(non-existent)/32                                      11.67        11.63         -0.04           -0.32
std::map<std::string,_int>::lower_bound(key)_(non-existent)/8192                                    31.81        32.33          0.52            1.64
std::map<std::string,_int>::upper_bound(key)_(existent)/0                                            0.04         0.04         -0.00           -2.22
std::map<std::string,_int>::upper_bound(key)_(existent)/1024                                        29.91        26.51         -3.40          -11.38
std::map<std::string,_int>::upper_bound(key)_(existent)/32                                          19.69        17.74         -1.95           -9.92
std::map<std::string,_int>::upper_bound(key)_(existent)/8192                                        32.55        35.24          2.69            8.25
std::map<std::string,_int>::upper_bound(key)_(non-existent)/0                                        0.27         0.27         -0.00           -1.74
std::map<std::string,_int>::upper_bound(key)_(non-existent)/1024                                    23.87        26.77          2.91           12.18
std::map<std::string,_int>::upper_bound(key)_(non-existent)/32                                      11.44        11.81          0.37            3.24
std::map<std::string,_int>::upper_bound(key)_(non-existent)/8192                                    33.02        32.59         -0.43           -1.29
std::set<int>::lower_bound(key)_(existent)/0                                                         0.01         0.01          0.00            0.48
std::set<int>::lower_bound(key)_(existent)/1024                                                      7.83         4.21         -3.62          -46.23
std::set<int>::lower_bound(key)_(existent)/32                                                        2.74         1.68         -1.06          -38.81
std::set<int>::lower_bound(key)_(existent)/8192                                                     22.75        11.12        -11.63          -51.12
std::set<int>::lower_bound(key)_(non-existent)/0                                                     0.28         0.27         -0.01           -3.52
std::set<int>::lower_bound(key)_(non-existent)/1024                                                 17.15         8.40         -8.75          -51.03
std::set<int>::lower_bound(key)_(non-existent)/32                                                    4.63         2.50         -2.13          -46.03
std::set<int>::lower_bound(key)_(non-existent)/8192                                                 28.88        11.05        -17.82          -61.72
std::set<int>::upper_bound(key)_(existent)/0                                                         0.01         0.01         -0.00           -7.79
std::set<int>::upper_bound(key)_(existent)/1024                                                      7.80         3.63         -4.16          -53.42
std::set<int>::upper_bound(key)_(existent)/32                                                        2.81         1.90         -0.91          -32.44
std::set<int>::upper_bound(key)_(existent)/8192                                                     21.93        11.35        -10.58          -48.26
std::set<int>::upper_bound(key)_(non-existent)/0                                                     0.28         0.27         -0.01           -3.81
std::set<int>::upper_bound(key)_(non-existent)/1024                                                 16.76         7.38         -9.38          -55.98
std::set<int>::upper_bound(key)_(non-existent)/32                                                    4.58         3.10         -1.48          -32.31
std::set<int>::upper_bound(key)_(non-existent)/8192                                                 26.95        10.70        -16.25          -60.29
std::set<std::string>::lower_bound(key)_(existent)/0                                                 0.04         0.04          0.00            0.02
std::set<std::string>::lower_bound(key)_(existent)/1024                                             28.08        27.04         -1.04           -3.71
std::set<std::string>::lower_bound(key)_(existent)/32                                               17.53        16.94         -0.58           -3.34
std::set<std::string>::lower_bound(key)_(existent)/8192                                             32.79        33.28          0.49            1.49
std::set<std::string>::lower_bound(key)_(non-existent)/0                                             0.28         0.28         -0.00           -0.06
std::set<std::string>::lower_bound(key)_(non-existent)/1024                                         25.23        24.38         -0.85           -3.38
std::set<std::string>::lower_bound(key)_(non-existent)/32                                           11.45        11.68          0.24            2.07
std::set<std::string>::lower_bound(key)_(non-existent)/8192                                         32.30        36.80          4.50           13.95
std::set<std::string>::upper_bound(key)_(existent)/0                                                 0.04         0.04         -0.00           -0.14
std::set<std::string>::upper_bound(key)_(existent)/1024                                             26.71        26.37         -0.34           -1.27
std::set<std::string>::upper_bound(key)_(existent)/32                                               20.07        19.06         -1.02           -5.06
std::set<std::string>::upper_bound(key)_(existent)/8192                                             36.69        35.50         -1.19           -3.25
std::set<std::string>::upper_bound(key)_(non-existent)/0                                             0.28         0.28         -0.00           -0.16
std::set<std::string>::upper_bound(key)_(non-existent)/1024                                         24.48        24.90          0.42            1.73
std::set<std::string>::upper_bound(key)_(non-existent)/32                                           11.68        11.77          0.09            0.77
std::set<std::string>::upper_bound(key)_(non-existent)/8192                                         33.16        34.12          0.96            2.89
```
2025-10-09 08:45:03 +02:00
Baranov Victor
496d0719a2 [libc++][CI] Use fully qualified names in docker images (NFC) (#162156)
Based on
https://github.com/llvm/llvm-project/pull/162007#issuecomment-3373161948,
we should avoid having short links in docker images.
2025-10-09 00:54:11 +03:00
Martin Storsjö
981dadcd60 [libcxx] Map Windows ERROR_NETNAME_DELETED to no_such_file_or_directory (#162257)
This fixes spurious failures in
std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
on Windows.

As part of that test, libcxx tries to open a fake network path such as
"//foo/a". Normally, this sets the error ERROR_BAD_NETPATH, which is
mapped to no_such_file_or_directory. However occasionally, it can end up
setting the error ERROR_NETNAME_DELETED instead.

Map ERROR_NETNAME_DELETED to no_such_file_or_directory just like
ERROR_BAD_NETPATH is mapped. This makes these cases be treated equally
within the create_file_status function in
src/filesystem/file_descriptor.h, causing the __weakly_canonical
function in operations.cpp to keep iterating, rather than erroring out.
2025-10-07 22:32:07 +03:00
Nikolas Klauser
a798a10434 [libc++] Optimize vector<bool>(const vector<bool>&) (#161672)
```
Benchmark                   Baseline    Candidate    Difference    % Difference
------------------------  ----------  -----------  ------------  --------------
BM_vector_bool_copy_ctor       56.93        10.93        -46.00          -80.80
BM_vector_bool_size_ctor        7.99         8.01          0.02            0.22
```
2025-10-07 15:07:12 +02:00
Nikolas Klauser
b717f839a3 [libc++] Don't use std::allocator inside <any> (#161061)
There isn't much of a reason to use the allocator abstraction facilities
inside `<any>`. We can improve compile times a bit by avoiding them and
using `__libcpp_{,de}allocate` directly. IMO this also significantly
improves readability here.
2025-10-07 14:58:36 +02:00
Nikolas Klauser
70b7874ab2 [libc++] Make the naming of the iterator_traits aliases consistent (#161661)
This renames all the `iterator_traits` alises to be
`__iterator_<type-name>`. e.g `iterator_traits<T>::value_type` will be
`__iterator_value_type<T>`.
2025-10-07 14:42:11 +02:00
Louis Dionne
885e7833b5 [libc++] Allow sorting by a few criteria in compare-benchmarks 2025-10-07 08:38:08 -04:00
Martin Storsjö
646bc09d17 [libcxx] Run tests on Windows/arm64 too (#161906)
Github Actions has got free runners with Windows on ARM64 these days,
which can be used for running CI, just as well as the other existing
cases.

This qualifies this configuration as a supported target platform, thus
add it to the docs in the listing of supported platforms.
2025-10-07 14:20:41 +03:00
Nikolas Klauser
b88af6635c [libc++] Don't bother asserting that <bit> functions get unsigned types (#161487)
The builtins already diagnose types other than unsigned integers, so
there is no point in `static_assert`ing that again.
2025-10-07 10:29:20 +02:00
Hristo Hristov
45c41247f8 [libc++][ranges] P3060R3: Add std::views::indices(n) (#146823)
Implements [P3060R3](https://wg21.link/P3060R3)

Closes #148175

# References

- https://github.com/cplusplus/draft/issues/7966
- https://github.com/cplusplus/draft/pull/8006
- https://wg21.link/customization.point.object
- https://wg21.link/range.iota.overview
- https://wg21.link/ranges.syn

---------

Co-authored-by: Hristo Hristov <zingam@outlook.com>
Co-authored-by: A. Jiang <de34@live.cn>
2025-10-06 18:13:25 +03:00
Nikolas Klauser
4b05a12e9c [libc++] Fix simd_unary.pass.cpp with AppleClang
When using AppleClang the `clang` feature flag is not set, but the
compiler supports `-flax-vector-conversions=integer`. This adds another
`ADDITIONAL_COMPILE_FLAGS` for AppleClang to fix the CI.
2025-10-06 12:47:51 +02:00
Martin Storsjö
5d3b3eaaa0 [libcxx] Mark system_reserved_names.gen.py unsupported on clang-20 && msvc (#161811)
Clang 20 (and early 21 versions; let's hope it can be fixed before the
later versions before such versions become relevant for libcxx CI) have
got an issue with its intrinsics headers, where they use unreserved
names, that users are allowed to override.

See https://github.com/llvm/llvm-project/issues/161808 for the issue
report.

This only crops up in the MSVC build configurations, as recent versions
of some MSVC/UCRT headers include `<intrin.h>`, which ends up pulling in
most intrinsics headers, exposing this issue in the Clang headers.

This should unblock https://github.com/llvm/llvm-project/pull/161736
from being merged.
2025-10-03 17:45:14 +03:00
Corentin Jabot
e9972debc9 [Clang] Normalize constraints before checking for satisfaction (#161671)
In the standard, constraint satisfaction checking is done on the
normalized form of a constraint.

Clang instead substitutes on the non-normalized form, which causes us to
report substitution failures in template arguments or concept ids, which
is non-conforming but unavoidable without a parameter mapping

This patch normalizes before satisfaction checking. However, we preserve
concept-id nodes in the normalized form, solely for diagnostics
purposes.

This addresses https://github.com/llvm/llvm-project/issues/61811 and
related concepts conformance bugs, ideally to make the remaining
implementation of concept template parameters easier

Fixes https://github.com/llvm/llvm-project/issues/135190
Fixes https://github.com/llvm/llvm-project/issues/61811

Co-authored-by: Younan Zhang
[zyn7109@gmail.com](mailto:zyn7109@gmail.com)

---------

Co-authored-by: Younan Zhang <zyn7109@gmail.com>
2025-10-03 09:29:23 +02:00
Corentin Jabot
047f8c8ee0 Revert "[Clang] Normalize constraints before checking for satisfaction" (#161669)
Reverts llvm/llvm-project#141776

CI failures

https://lab.llvm.org/buildbot/#/builders/202/builds/3591 
https://lab.llvm.org/buildbot/#/builders/55/builds/18066
https://lab.llvm.org/buildbot/#/builders/85/builds/14103
2025-10-02 15:58:55 +02:00
Corentin Jabot
9583b399d8 [Clang] Normalize constraints before checking for satisfaction (#141776)
In the standard, constraint satisfaction checking is done on the
normalized form of a constraint.

Clang instead substitutes on the non-normalized form, which causes us to
report substitution failures in template arguments or concept ids, which
is non-conforming but unavoidable without a parameter mapping

This patch normalizes before satisfaction checking. However, we preserve
concept-id nodes in the normalized form, solely for diagnostics
purposes.

This addresses #61811 and related concepts conformance bugs, ideally to
make the remaining implementation of concept template parameters easier

Fixes #135190
Fixes  #61811

Co-authored-by: Younan Zhang <zyn7109@gmail.com>
2025-10-02 14:35:38 +02:00
Nikolas Klauser
55803b8af1 Reapply "[libc++] Avoid constructing additional objects when using map::at" (#160738) (#161485)
This reverts commit b86aaacf28.

The issue in LLVM has been fixed now.
2025-10-02 11:15:33 +02:00
Nikolas Klauser
66558d70dc [libc++] Fix <__algorithm/find.h> when using -flax-vector-conversions=none (#161362) 2025-10-02 10:05:26 +02:00
Nikolas Klauser
0b0dcf856a [libc++] Upgrade Xcode to 26.0 (#160097) 2025-10-02 09:32:30 +02:00
Louis Dionne
a9b8dfe7b5 [libc++] Add a script to find outliers and re-run candidates in LNT results
This allows selectively re-running benchmarks that are suspected to contain
a lot of noise.
2025-10-01 12:38:24 -04:00
Hristo Hristov
ccd06e4809 [libc++][istream] P3223R2: Making std::istream::ignore less surprising (#147007)
Implements https://wg21.link/P3223R2 as a DR as, as recommended in
https://github.com/cplusplus/papers/issues/1871#issuecomment-2993018698.
Resolves -1L ambiguity.

Closes #148178
2025-09-30 11:26:30 -04:00
Martin Storsjö
870e4f9a52 [libc++][test] Use ASSERT_WITH_LIBRARY_INTERNAL_ALLOCATIONS in more places (#144339)
ASSERT_WITH_LIBRARY_INTERNAL_ALLOCATIONS allows waiving asserts, for
cases when we can't count allocations that happen within the libc++
shared library.

When compiling with optimization, it is possible that some calls end up
generated inline, where the overridden operator new/delete do get called
(counting those calls), whereas the compiler may decide to leave some
calls to the external definition (inside the shared library, where we
can't count the calls).

In particular, in one case, a non-optimized build calls
_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev from
the DLL, while it gets inlined (including direct calls to operator
delete) when built with optimization.

Therefore; for the cases where we can't count allocations internally
within the library, waive these asserts.

This fixes all testcases in mingw mode, when built with optimization
enabled.
2025-09-30 11:21:25 -04:00
halbi2
b9e41ae6f9 [clang][libc++] Fix spelling of "synthesize" (#158523)
There is a tradition to use U.S. English spellings for APIs. For
example, it's uninitialized_fill and not uninitialised_fill,
specialization not specialisation, etcetera.
2025-09-30 08:29:59 +02:00
Louis Dionne
b285bac972 [libc++][NFC] In documentation, fix path to benchmark that has now moved 2025-09-29 09:46:21 -04:00
Nikolas Klauser
97367d1046 [libc++] Vectorize std::find (#156431)
```
Apple M4:
-----------------------------------------------------------------------------
Benchmark                                                 old             new
-----------------------------------------------------------------------------
std::find(vector<char>) (bail 25%)/8                  1.43 ns         1.44 ns
std::find(vector<char>) (bail 25%)/1024               5.54 ns         5.59 ns
std::find(vector<char>) (bail 25%)/8192               38.4 ns         39.1 ns
std::find(vector<char>) (bail 25%)/32768               134 ns          136 ns
std::find(vector<int>) (bail 25%)/8                   1.56 ns         1.57 ns
std::find(vector<int>) (bail 25%)/1024                65.3 ns         65.4 ns
std::find(vector<int>) (bail 25%)/8192                 465 ns          464 ns
std::find(vector<int>) (bail 25%)/32768               1832 ns         1832 ns
std::find(vector<long long>) (bail 25%)/8            0.920 ns         1.20 ns
std::find(vector<long long>) (bail 25%)/1024          65.2 ns         31.2 ns
std::find(vector<long long>) (bail 25%)/8192           464 ns          255 ns
std::find(vector<long long>) (bail 25%)/32768         1833 ns          992 ns
std::find(vector<char>) (process all)/8               1.21 ns         1.22 ns
std::find(vector<char>) (process all)/50              1.92 ns         1.93 ns
std::find(vector<char>) (process all)/1024            16.6 ns         16.9 ns
std::find(vector<char>) (process all)/8192             134 ns          136 ns
std::find(vector<char>) (process all)/32768            488 ns          503 ns
std::find(vector<int>) (process all)/8                2.45 ns         2.48 ns
std::find(vector<int>) (process all)/50               12.7 ns         12.7 ns
std::find(vector<int>) (process all)/1024              236 ns          236 ns
std::find(vector<int>) (process all)/8192             1830 ns         1834 ns
std::find(vector<int>) (process all)/32768            7351 ns         7346 ns
std::find(vector<long long>) (process all)/8          2.02 ns         1.45 ns
std::find(vector<long long>) (process all)/50         12.0 ns         6.12 ns
std::find(vector<long long>) (process all)/1024        235 ns          123 ns
std::find(vector<long long>) (process all)/8192       1830 ns          983 ns
std::find(vector<long long>) (process all)/32768      7306 ns         3969 ns
std::find(vector<bool>) (process all)/8               1.14 ns         1.15 ns
std::find(vector<bool>) (process all)/50              1.16 ns         1.17 ns
std::find(vector<bool>) (process all)/1024            4.51 ns         4.53 ns
std::find(vector<bool>) (process all)/8192            33.6 ns         33.5 ns
std::find(vector<bool>) (process all)/1048576         3660 ns         3660 ns
```
2025-09-29 11:10:19 +02:00
Nikolas Klauser
1ab4113d0e [libc++] Remove a bunch of unused includes from <flat_*> (#160658) 2025-09-28 09:19:15 +02:00
lbonn
d1b5607dc1 [libc++][ranges] Fix ranges::join_view segmented iterator trait (#158347)
The outer iterator needs to move to the next segment when calling
__compose.

Without this change, `find_segment_if` would never reach the end of the
join_view which caused erroneous result when calling `ranges::find` on a
join_view of bidirectional ranges.

Other specializations using the segmented iterator trait were likely to
be affected as well.

Fixes #158279
Fixes #93180
2025-09-27 22:49:54 +08:00
Aiden Grossman
37e7ad184d [libcxx] Add local %T substitution
This patch adds a %T substitution directly into the libc++ test format.
This ensures that the libc++ test format will continue to work when we
remove support for %T in llvm lit.

Reviewers: #reviewers-libcxx, ldionne, philnik777

Pull Request: https://github.com/llvm/llvm-project/pull/160026
2025-09-26 15:48:02 -07:00
Louis Dionne
d636dc8358 [libc++] Support comparison of more than two data sets in compare-benchmarks 2025-09-26 11:27:15 -04:00
Louis Dionne
42dd9260db [libc++] Switch back to plotting on revlist order for visualize-historical
That provides vastly better plots.
2025-09-26 07:47:21 -04:00
A. Jiang
f6fc5e83d7 [libc++][test] Guard non-guaranteed implicit-lifetime-ness cases with _LIBCPP_VERSION (#160627)
And add some guaranteed cases (namely, for `expected`, `optional`, and
`variant`) to `is_implicit_lifetime.pass.cpp`.

It's somehow unfortunate that `pair` and `tuple` are not guaranteed to
propagate triviality of copy/move constructors, and MSVC STL fails to do
so due to ABI compatibility. This affects the implicit-lifetime
property.
2025-09-26 18:07:59 +08:00
Louis Dionne
2810a489d2 [libc++] Use pandas.DataFrame in compare-benchmarks
This opens the door to performing more advanced computations on the
data we're comparing.
2025-09-25 20:43:57 -04:00
Andrew Lazarev
b86aaacf28 Revert "[libc++] Avoid constructing additional objects when using map::at" (#160738)
Reverts llvm/llvm-project#157866

It breaks a lot of sanitizer buildbots
2025-09-25 15:10:37 -07:00
Nikolas Klauser
1b0553c9fa [libc++] Use _BitInt and __builtin_popcountg in bitset::count() (#160679)
This has multiple benefits:
1) The compiler has to do way less work to figure out things fold into a
simple `popcount`, improving compile times quite a bit
2) The compiler inlines better, since the compile doesn't have to do
complicated optimizations to get to the same point. Looking at the
pipeline, it seems that without this, LLVM has to go all the way to GVN
to get to the same code as there is after the first InstCombine pass
with this change.

Currently this applies only to `bitset`s with at most 64 bits, but that
is by far the most common case.
2025-09-25 20:16:27 +02:00
Nikolas Klauser
cc95c5680e [libc++] Remove alignment attributes from _LIBCPP_COMPRESSED_PAIR (#158595)
These attributes aren't required anymore, since the potential
overalignemnt of the objects is handled by the surrounding anonymous
struct.
2025-09-25 19:59:08 +02:00
Nikolas Klauser
96a7c9b985 [libc++] Simplify vector<bool> fill constructors (#160521)
#119632 introduced a code size and performance regression. This was
verified by running the included benchmark against trunk and trunk with
#119632 reverted. Instead of actually reverting that patch, we can
inline `__construct_at_end` into the few places it's used instead,
simplifying the implementation further (by not handling special cases we
never actually encounter).

```
Benchmark                   Baseline    Candidate    Difference    % Difference
------------------------  ----------  -----------  ------------  --------------
BM_vector_bool_size_ctor       29.91         8.56        -21.35          -71.37
```
2025-09-25 19:48:14 +02:00
Louis Dionne
62450ba905 [libc++] Improve handling of runtime errors inside SPEC benchmarks
Previously, we would report a successful run if the benchmark exited
with an error, and we would produce a timing for the benchmark. After
this patch, we consider an error in the benchmark to be a failed LIT
test and we don't produce any benchmark data for it.
2025-09-25 13:13:32 -04:00
cmtice
ec27c2d340 [libc++] Add link to premerge tesing dashboard to docs. (#160342)
This adds a link to the dashboard that shows premerge testing queue and
run times for libc++ testing, to the Contributing.rst document.
2025-09-25 08:08:06 -07:00
Nikolas Klauser
2a82e71835 [libc++] Remove __time_get_storage::{__analyze,init} from the ABI (#158469)
These functions have never been used outside the dylib, so there is no
point in exporting them.
2025-09-25 15:35:43 +02:00