[llvm] [RFC][DataLayout] Add null pointer value infrastructure (PR #183207)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 15:02:24 PDT 2026


arichardson wrote:

For my work on CHERI I would like to see a way to have AS200 behave almost the same way as AS0, including the null dereferencing property to get the improved codegen and folding abilities. So tying the null representation and dereferencability is fine for me, but I'd also be happy for this to be another opt-in property.

Or maybe we should have non-dereferencability of null as the default and use unknown null representation for something like 32/16 bit address spaces where there is no null and all pointers point to a valid memory address. But I'm not sure if we actually support any address spaces that don't have NULL? 

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


More information about the llvm-commits mailing list