[PATCH] D112531: [RFC][DataLayout] Allow vector specifications by element size

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 3 12:19:31 PST 2021


nikic added a comment.

In D112531#3168987 <https://reviews.llvm.org/D112531#3168987>, @frasercrmck wrote:

> In D112531#3163628 <https://reviews.llvm.org/D112531#3163628>, @nikic wrote:
>
>> Just to make sure that we don't end up with another incomplete solution: Are there any architectures where alignment could depend on both element size and total size? Are there any where it could depend on element type, i.e. where a vector of i32 and a vector of f32 may have different alignment?
>
> Great question!  I'm not aware of such architectures but that's not to say they don't exist. I'm not sure how best to answer that question, given all the weird and wonderful architectures out there, unless a poll on llvm-dev suffices?

Based on you the discussion in your comment, I think the important bit is that there is a viable future extension path: Even if we have just `ve` now, we can later extend that to also include a minimal total vector size etc using the scheme you suggest, if it becomes necessary. That looks like a backwards-compatible extension to me. Though probably checking with llvm-dev wouldn't hurt.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112531



More information about the llvm-commits mailing list