[PATCH] D90884: Add `SVec<T>`, a SmallVector with a default small size.

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 08:48:27 PST 2020


dexonsmith added a comment.

In D90884#2392713 <https://reviews.llvm.org/D90884#2392713>, @silvas wrote:

> My plan here is to get a few approvals on this patch, and then take the discussion to llvm-dev for some final aspects:
>
> - how we should document this (e.g. programmer guide addition and "default" recommendation)
> - to what extent we want reviewers to suggest SVec
> - how much we want to bulk migrate code SVec vs let it organically grow.

Two thoughts to consider incorporating into the RFC:

1. I'd be concerned `SVector<T>` / `SVec<T>` will be "too" ergonomic, and people won't bother with `SmallVector<T, 0>` when it's more appropriate. Adding `Vector<T>` / `Vec<T>` at the same time would mitigate that. Also, instances of `SmallVector<T, 0>` could be updated to use `Vector<T>` en masse without much controversy, which might help with discovery of `{S,}Vector` if there's resistance to updating other `SmallVector`s en masse (and I think there will be).

2. It'd be nice to have a rough draft of changes to docs/ in this patch already when the RFC goes out, essentially giving an initial opinion and what the recommendations should be. (FWIW, I feel the docs should land in the same commit as the classes if possible.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90884/new/

https://reviews.llvm.org/D90884



More information about the llvm-commits mailing list