[RFC] SortedVector ADT

Puyan Lotfi puyan at puyan.org
Fri Jul 31 11:19:50 PDT 2015


On Fri, Jul 31, 2015 at 10:04 AM, Aaron Ballman <aaron at aaronballman.com>
wrote:

> 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
>

I agree to move SortedVector to MachineBasicBlock for the time being, until
I find other places in LLVM that could use it.
If anyone thinks this is a bad call I'd like that feedback now.

PL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150731/8f08eb6d/attachment.html>


More information about the llvm-commits mailing list