https://github.com/cjdb auto_merge_enabled
https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/cjdb closed https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
cjdb wrote:
Ping
https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -65,6 +203,170 @@ public:
using iterator = pointer;
using const_iterator = const_pointer;
+public:
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
__split_buffer_size_layout() = default;
+
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _L
@@ -184,242 +458,232 @@ public:
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
swap(__split_buffer& __x)
_NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
__is_nothrow_swappable_v<__alloc_rr>);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_F
@@ -65,6 +203,170 @@ public:
using iterator = pointer;
using const_iterator = const_pointer;
+public:
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI
__split_buffer_size_layout() = default;
+
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _L
@@ -820,6 +820,26 @@ class vector {
__add_alignment_assumption(_Ptr __p) _NOEXCEPT {
return __p;
}
+
+ template class _Layout>
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+ __swap_layouts(__split_buffer<_Tp, allocator_type&, _Layout>& __v) {
+auto
https://github.com/cjdb commented:
```
$ libcxx/utils/libcxx-compare-benchmarks
build-c7df8839d8f161883e5b4c3847c3470ab8e08e64 build-size-based-vector
libcxx/test/benchmarks/containers/sequence/vector.bench.cpp
Requirement already satisfied: numpy in
/tmp/libcxx-compare-benchmarks-venv/lib/pyt
cjdb wrote:
Ping
https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/cjdb edited https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/cjdb edited https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -428,50 +653,60 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp,
_Allocator>::shrink_to_fi
}
}
-template
+template class
_Layout>
template
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp,
_Allocator>::emplace_front(_Args&&... __args) {
- if (__begi
@@ -78,23 +336,18 @@ public:
__split_buffer,
void>;
- pointer __first_;
- pointer __begin_;
- pointer __end_;
- _LIBCPP_COMPRESSED_PAIR(pointer, __cap_, allocator_type, __alloc_);
-
__split_buffer(const __split_buffer&)
@@ -428,50 +653,60 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp,
_Allocator>::shrink_to_fi
}
}
-template
+template class
_Layout>
template
-_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp,
_Allocator>::emplace_front(_Args&&... __args) {
- if (__begi
@@ -45,13 +47,129 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-// __split_buffer allocates a contiguous chunk of memory and stores objects in
the range [__begin_, __end_).
-// It has uninitialized memory in the ranges [__first_, __begin_) and
[__end_, __cap_). That
@@ -78,23 +80,232 @@ public:
__split_buffer,
void>;
- pointer __first_;
- pointer __begin_;
- pointer __end_;
- _LIBCPP_COMPRESSED_PAIR(pointer, __cap_, allocator_type, __alloc_);
+ struct __data {
+pointer __first_ = nullpt
cjdb wrote:
@ldionne if you don't have any further commentary, I'd like to merge this PR so
that I can move on to upstreaming size-based vector.
https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
@@ -74,6 +77,40 @@ def stdstring_SummaryProvider(valobj, dict):
return '"' + strval + '"'
+def get_buffer_data(parent):
+map_valobj = parent.valobj.GetChildMemberWithName("__map_")
+map_data = map_valobj.GetChildMemberWithName("__data_")
+if map_data.I
cjdb wrote:
@ldionne Would you mind reviewing this again, please?
https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
cjdb wrote:
Done.
https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -184,67 +172,299 @@ public:
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
swap(__split_buffer& __x)
_NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
__is_nothrow_swappable_v<__alloc_rr>);
- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FR
cjdb wrote:
I think the third option is the best, which will let us control vector and
deque independently.
https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
h
cjdb wrote:
You're right that it's not _strictly_ necessary, but it makes the code
**substantially** simpler when they're coupled. Otherwise, we need to convert
from using a size-based vector to a pointer-based `__split_buffer`, which I
found to be confusing
cjdb wrote:
@vogelsgesang, this patch is only changing `__split_buffer`. The intention was
for this patch to be quickly merged, and for the feedback from this patch to
influence the changes to `vector` (thereby minimising churn and repeated
comments). Changes
@@ -253,30 +436,35 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp,
_Allocator>::__construct_
template
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
__split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n,
const_reference __x) {
- _ConstructTransaction __tx(std::add
cjdb wrote:
I still think that `_LIBCPP_SIZE_BASED_VECTOR` is the most appropriate name,
since this work was entirely motivated by size-based vector, and this PR is a
precursor to enabling size-based vector in libc++. The changes to `std::deque`
are only happ
@@ -431,52 +599,61 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp,
_Allocator>::shrink_to_fi
template
template
_LIBCPP_CONSTEXPR_SINCE_CXX20 void __split_buffer<_Tp,
_Allocator>::emplace_front(_Args&&... __args) {
- if (__begin_ == __first_) {
-if (__end_ < _
@@ -78,23 +80,232 @@ public:
__split_buffer,
void>;
- pointer __first_;
- pointer __begin_;
- pointer __end_;
- _LIBCPP_COMPRESSED_PAIR(pointer, __cap_, allocator_type, __alloc_);
+ struct __data {
cjdb wrote:
cjdb wrote:
Ping. I would appreciate it if this PR could be merged in time for my
presentation at Asia LLVM, which is at the start of next week.
https://github.com/llvm/llvm-project/pull/139632
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://github.com/cjdb updated https://github.com/llvm/llvm-project/pull/139632
>From 88bc35049f774c8c3a5c35ff22470a0670ee3e9d Mon Sep 17 00:00:00 2001
From: Christopher Di Bella
Date: Wed, 7 May 2025 20:41:56 +
Subject: [PATCH 1/5] [libcxx] adds size-based `__split_buffer` representation
https://github.com/cjdb closed https://github.com/llvm/llvm-project/pull/106433
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -1149,9 +1171,11 @@ struct Proxy {
// Calling swap(Proxy{}, Proxy{}) would fail (pass prvalues)
// Compare operators are defined for the convenience of the tests
- friend constexpr bool operator==(const Proxy&, const Proxy&)
-requires (std::equality_comparable && !
@@ -0,0 +1,54 @@
+// -*- C++ -*-
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-
@@ -1161,9 +1185,11 @@ struct Proxy {
return lhs.data == rhs.data;
}
- friend constexpr auto operator<=>(const Proxy&, const Proxy&)
-requires (std::three_way_comparable && !std::is_reference_v)
- = default;
+ friend constexpr auto operator<=>(const Proxy& lhs, co
@@ -1172,6 +1198,22 @@ struct Proxy {
requires std::three_way_comparable_with, std::decay_t> {
return lhs.data <=> rhs.data;
}
+
+ // Needed to allow certain types to be weakly_incremental
+ constexpr Proxy& operator++()
+requires(HasPreIncrementOp)
+ {
+++
https://github.com/cjdb edited https://github.com/llvm/llvm-project/pull/68494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -0,0 +1,171 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-
@@ -1149,9 +1171,11 @@ struct Proxy {
// Calling swap(Proxy{}, Proxy{}) would fail (pass prvalues)
// Compare operators are defined for the convenience of the tests
- friend constexpr bool operator==(const Proxy&, const Proxy&)
-requires (std::equality_comparable && !
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-
@@ -1083,6 +1083,27 @@ rvalue_iterator(T*) -> rvalue_iterator;
static_assert(std::random_access_iterator>);
+// The ProxyDiffTBase allows us to conditionally specify
Proxy::difference_type
+// which we need in certain situations. For example when we want
+// std::weakly_incr
https://github.com/cjdb requested changes to this pull request.
Thanks for working on this, it's an important algorithm to have. I've left some
comments, but would like to see this merged by the end of January.
https://github.com/llvm/llvm-project/pull/68494
@@ -0,0 +1,171 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -13,7 +13,7 @@
// Range algorithms should return `std::ranges::dangling` when given a
dangling range.
cjdb wrote:
Please revert and apply in a separate patch.
https://github.com/llvm/llvm-project/pull/68494
___
Author: Christopher Di Bella
Date: 2021-08-11T02:48:53Z
New Revision: c874dd53628db8170d4c5ba3878817abc385a695
URL:
https://github.com/llvm/llvm-project/commit/c874dd53628db8170d4c5ba3878817abc385a695
DIFF:
https://github.com/llvm/llvm-project/commit/c874dd53628db8170d4c5ba3878817abc385a695.dif
46 matches
Mail list logo