[llvm] [DataLayout] Add isNullPointerAllZeroes (PR #165314)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 28 03:33:43 PDT 2025
nikic wrote:
The point is that introducing support for non-zero null pointers is a non-trivial IR change, which will require changes in multiple places. It's something we want to do, but it needs to be coordinated. Only introducing a DataLayout method for this creates the incorrect impression that non-zero null pointers are supported by LLVM.
If you want to introduce this kind of method, the implementation should basically be `bool isNullPointerAllZeroes(unsigned AS) { return true; }` rather than `return AS == 0`. This represents current IR semantics, while making them simpler to change in the future. Though I'm not sure doing this at this point is really useful.
https://github.com/llvm/llvm-project/pull/165314
More information about the llvm-commits
mailing list