[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 9 18:27:18 PST 2023


ahatanak updated this revision to Diff 496305.
ahatanak added a comment.

- Set the `KnownNonNull` bit correctly when `Address::withAlignment` is called.
- Pass `NotKnownNonNull` to the call to `Addr.withPointer` when the address of thread local storage is created.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142584/new/

https://reviews.llvm.org/D142584

Files:
  clang/lib/CodeGen/Address.h
  clang/lib/CodeGen/CGBuilder.h
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/CGClass.cpp
  clang/lib/CodeGen/CGDecl.cpp
  clang/lib/CodeGen/CGException.cpp
  clang/lib/CodeGen/CGExpr.cpp
  clang/lib/CodeGen/CGExprCXX.cpp
  clang/lib/CodeGen/CGNonTrivialStruct.cpp
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/lib/CodeGen/CGValue.h
  clang/lib/CodeGen/CodeGenFunction.cpp
  clang/lib/CodeGen/CodeGenFunction.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142584.496305.patch
Type: text/x-patch
Size: 39326 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230210/71946288/attachment-0001.bin>


More information about the cfe-commits mailing list