[clang] [clang] add array out-of-bounds access constraints using llvm.assume (PR #159046)

Sebastian Pop via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 9 10:26:03 PDT 2025


sebpop wrote:

I think we need to generate only one assume per declaration instead of littering the IR with assumes for every use and rely on optimizers to fold all the assumes to a single one.

The current way is the declarations of arrays also contain the dimensions sizes. If this type gets removed from alloca/globals (from what I understood in the next ~2 years) a possible way to provide the array dimensions is to maintain the info in a symbol table (as meta-data or so.)

https://github.com/llvm/llvm-project/pull/159046


More information about the cfe-commits mailing list