[PATCH] D71435: [WIP] [Attributor] Function level undefined behavior attribute

Stefanos Baziotis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 03:54:31 PST 2019


baziotis added a comment.

> No, AADerferenceable will not tell you if it is "not dereferenceanle" but only if it is.

Yes, my bad. Since the number of dereferenceable is only increasing.

> What I tried to say in more words:
> 
> Do not assume NULL cannot be dereferenced, thus that a load from NULL would be UB for sure. NULL can be a valid pointer, it just happens to be one that is different on your OS. In order to determine if NULL can be dereferenced, use the NullPointerIsDefined helper function, you can find some uses of it in the Attributor.cpp file already.

Oh yes, ok, got it.


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

https://reviews.llvm.org/D71435





More information about the llvm-commits mailing list