[PATCH] D47895: llvm: Add support for "-fno-delete-null-pointer-checks"

Manoj Gupta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 18 13:00:26 PDT 2018


manojgupta added a comment.

In https://reviews.llvm.org/D47895#1133937, @efriedma wrote:

> > I went through those files but many of these addressSpace() == 0 (and != 0) checks are not for null pointers but for disabling/skipping some memory optimizations. And it is not clear to me if moving all of those checks to the new NullPointerIsDefined function makes sense there.
>
> We should probably add a section to LangRef on address spaces, and what transforms are specifically allowed only in address space 0.
>
> I'm sure we need to handle null-pointer-is-valid in CallSite.h, at least.


Thanks! I updated CallSite.h and also LoopAccessAnalysis. Had to find another home for NullPointerIsDefined function so moved it to Function.h.
I am in split mind about adding theses checks to BasicAliasAnalysis so need your opinion.


Repository:
  rL LLVM

https://reviews.llvm.org/D47895





More information about the llvm-commits mailing list