[llvm-dev] [RFC] Adding range metadata to array subscripts.

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 30 10:53:33 PDT 2021


Am Mo., 29. März 2021 um 01:08 Uhr schrieb Clement Courbet <courbet at google.com>:
> 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.

We can also introduce a new field into
GetElementPtrInst/GetElementPtrConstantExpr. Since it's
variable-sized, use of llvm::TrailingObjects (llvm::User calls it
co-allocation) might be necessary.

Michael


More information about the llvm-dev mailing list