Michael Kruse via llvm-dev
2021-Mar-25 16:32 UTC
[llvm-dev] [RFC] Adding range metadata to array subscripts.
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/D99341I 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. Michael
Clement Courbet via llvm-dev
2021-Mar-29 06:08 UTC
[llvm-dev] [RFC] Adding range metadata to array subscripts.
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>