[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 09:27:20 PDT 2025
sebpop wrote:
I am closing this PR because this is not tractable compared to another solution that we already have: #156342
This current PR #159046 attaches the same information again and again to every load, store, and array address. This is harmful for the size of the IR and for a lot of optimization cost functions that are not trained to deal with the assumes.
In contrast, PR #156342 only attaches the info once at the level of the declaration (currently alloca and globals declared types, and in the future it can be transitioned to meta-data attached to these decls.) LLVM IR analyses (delinearization, SCEV, DA, etc.) then extract and instantiate the array sizes in the context of the uses (loads and stores.)
https://github.com/llvm/llvm-project/pull/159046
More information about the cfe-commits
mailing list