[PATCH] D66618: [WIP] Expose functions to determine pointer properties (Align & Deref)

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 17:43:38 PDT 2019


jdoerfert added a comment.

In D66618#1645993 <https://reviews.llvm.org/D66618#1645993>, @efriedma wrote:

> Can we remove the CanBeNull argument from getPointerDereferenceableBytes()?  It looks like it's currently unused.  Or are you planning to use it somewhere?


This is a good question. For now, there are no users but there is a situation where we could use it: When we derive dereferenceable in the Attributor we also derive nonnull separately, if we would return `false` for `CanBeNull` we could update the `nonnull` attribute directly. Maybe there are other use cases, e.g., use flow information to rule out `NULL`, but I fail to see where we would exploit those.

For sure I have to describe better what all the combinations of return values would mean.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66618





More information about the llvm-commits mailing list