[PATCH] D90884: [SmallVector] Add a default small size.

Sean Silva via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 15:01:31 PST 2020


silvas added a comment.

In D90884#2387127 <https://reviews.llvm.org/D90884#2387127>, @mehdi_amini wrote:

> Random other proposal in the brainstorming here: introduce a subclass `llvm::Vector` that inherit from SmallVector and define the size as never exceeding 64B. `SmallVector` would always have an explicit size and `Vector` never: that at least address the case someone using `SmallVector<LargeSize>` and getting an implicit and unexpected `N=0`

Interesting idea! What do other folks think? That would make average code even more succinct (no "Small").

My only concern would be llvm::Vector sounds to me like something that would never have inlined elements, but this proposal would mean that sometimes it has a inlined elements.

Mehdi, so I can better understand your position, your main objection is for something called "SmallVector" to have zero inlined elements unless explicitly requested?


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