[RFC] SortedVector ADT

Aaron Ballman aaron at aaronballman.com
Fri Jul 31 10:04:32 PDT 2015


On Fri, Jul 31, 2015 at 12:48 PM, Puyan Lotfi <puyan at puyan.org> wrote:
>
>
> On Fri, Jul 31, 2015 at 9:44 AM, Krzysztof Parzyszek
> <kparzysz at codeaurora.org> wrote:
>>
>> On 7/31/2015 8:27 AM, Aaron Ballman wrote:
>>>
>>>
>>> I am wondering why this should be an ADT instead of one-off
>>> functionality. I see that you're going to use it for
>>> MachineBasicBlock, but are there other use cases as well? The kind of
>>> functionality that this class provides is covered by basic STL
>>> mechanisms, and so I am hesitant to support it as an ADT for all of
>>> our users unless this is something we expect will be heavily used (or
>>> is heavily customized to support toolchain needs).
>>
>>
>> I agree.  Also, I think we should avoid creating new ADT unless there is a
>> compelling reason to have our own implementation of a container.
>>
>
> Does this mean we should also try to remove any existing ADTs that aren't as
> compelling to have anymore?

Generally, no. If there's a good reason to remove something (e.g.,
prohibitively expensive to maintain) then it's worth considering. But
ADTs are things that out-of-tree projects rely on for interacting with
the project, and so removing them can be nontrivial for our end users.
They're not required to be ABI stable (that I'm aware of) from release
to release, but we tend to be pretty strict about breaking changes
with them.

~Aaron



More information about the llvm-commits mailing list