[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 08:25:47 PST 2023
ahatanak added inline comments.
================
Comment at: clang/lib/CodeGen/CGExpr.cpp:1723
+ Addr =
+ Addr.withPointer(Builder.CreateThreadLocalAddress(GV), KnownNonNull);
----------------
`KnownNonNull` is being passed here because the address of a load must be non-null. Do we have to check that the function doesn't have `null_pointer_is_valid` here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142584/new/
https://reviews.llvm.org/D142584
More information about the cfe-commits
mailing list