[all-commits] [llvm/llvm-project] d1a9df: [NFCI][IR] Add DataLayout pointer to zero and null...

Shilei Tian via All-commits all-commits at lists.llvm.org
Sat May 2 09:28:45 PDT 2026


  Branch: refs/heads/users/shiltian/constant-zero-value-apis
  Home:   https://github.com/llvm/llvm-project
  Commit: d1a9dfea4c351cb754148b82e4158154f6a90e90
      https://github.com/llvm/llvm-project/commit/d1a9dfea4c351cb754148b82e4158154f6a90e90
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2026-05-02 (Sat, 02 May 2026)

  Changed paths:
    M llvm/include/llvm/IR/Constant.h
    M llvm/lib/IR/Constants.cpp
    M llvm/unittests/IR/ConstantsTest.cpp

  Log Message:
  -----------
  [NFCI][IR] Add DataLayout pointer to zero and null value related APIs

When the semantics of `ConstantPointerNull` change to represent a semantic null
pointer in the future, a null value won't necessarily be a zero value anymore.
Because of that, the entire LLVM constant infrastructure will need to change. As
a first step, this PR adds an optional data layout pointer to `isNullValue`,
`isZeroValue`, `getNullValue`, and `getZeroValue`. It isn't used yet, since a
null value is still a zero value right now.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list