[PATCH] D135158: [DataLayout] Introduce DataLayout::getPointerIntegralSize(AS)
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 4 07:50:30 PDT 2022
arichardson added a comment.
In D135158#3833549 <https://reviews.llvm.org/D135158#3833549>, @nikic wrote:
> I don't really understand what the distinction between the index size and the integral size is supposed to be. Can you please give some examples where these two quantities would differ?
>
> I would be extremely vary of adding a third dimension to pointer sizes. The index size is already enough of a burden to deal with, and we've only recently approached something resembling correct use of index sizes.
Ah, in that case I would be more than happy to drop this distinction and just clarify the datalayout that the index size is the size of the address (which is what we do for CHERI already).
I added this new type based on your comment in D99660 <https://reviews.llvm.org/D99660>:
> The index type is used for GEP index and casting a pointer to the index type doesn't make a whole lot of sense to me. Do you have any LangRef wording or other usages that would show that this is a sensible thing to do?
Would a clarification to the LangRef be sufficient?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135158/new/
https://reviews.llvm.org/D135158
More information about the llvm-commits
mailing list