================

----------------
ldionne wrote:

Actually, enabling the size-based vector doesn't technically require these 
changes to `__split_buffer` AFAICT, since we only ever use `__split_buffer` as 
an implementation detail, and the representation of `__split_buffer` has no 
impact on the representation of `std::vector` itself. IMO this leaves a few 
options:
1. We don't bother changing the representation of `__split_buffer`, since 
that's only relevant to optimizing `std::deque` and I'm not certain that's a 
goal you're trying to achieve.
2. We do change the representation of `__split_buffer`, but then that should be 
keyed on `_LIBCPP_ABI_SIZE_BASED_DEQUE` since, like I said above, the 
representation of `__split_buffer` only impacts the representation of 
`std::deque`.
3. We refactor `__split_buffer` to accept the layout argument like I suggested 
in my original comment and we use the desired layout from both `deque` and 
`vector`. That makes everything very explicit, but it's not clear to me that 
this is needed if our end goal is truly just to optimize the representation of 
`std::vector`.

I'm curious to hear your thoughts on this, especially about the need to change 
`__split_buffer` at all in order to change the representation of `std::vector`. 
I don't know why it didn't occur to me earlier.

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

Reply via email to