[llvm-dev] [RFC] Adding range metadata to array subscripts. (original) (raw)

Clement Courbet via llvm-dev llvm-dev at lists.llvm.org
Sun Mar 28 23:08:45 PDT 2021


On Thu, Mar 25, 2021 at 5:33 PM Michael Kruse <llvmdev at meinersbur.de> wrote:

Am Do., 25. März 2021 um 09:42 Uhr schrieb Clement Courbet via llvm-dev <llvm-dev at lists.llvm.org>: > So I tried implementing this on top of inrange, and I found out that you can only have one inrange index, which doesn't allow us to represent access into multidimensional arrays : https://reviews.llvm.org/D99341

I think this is only for the internal representation. According to the reference (https://llvm.org/docs/LangRef.html#id230), it is allowed for each dimension. This means that we would have to store one bit per index instead of a single index (right now the implementation is limiting the number of indices to 64). That means that we can support at most 6 indices with SubclassOptionalData. That might be sufficient for the most common cases (not representing the inrange data is not a correctness issue), but we have to be aware of that limitation. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210329/4aba2735/attachment-0001.html>



More information about the llvm-dev mailing list