[PATCH] D24712: Replace 'isProvablyNonNull' with existing utility llvm::IsKnownNonNull.

Nick Lewycky via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 19 16:02:46 PDT 2016

On 19 September 2016 at 15:58, John McCall <rjmccall at gmail.com> wrote:

> rjmccall added a comment.
> Actually, that should demonstrate the difference, assuming the LLVM
> function looks through selects, since IRGen should generate that as a
> select.

It doesn't look past the Value* you hand it. As well as isa<AllocaInst>, it
returns true on Arguments marked nonnull, byval, inalloca or
dereferenceable, global variables in addrspace 0 and not extern_weak, load
instructions marked with !nonnull metadata, or a call/invoke with the
nonnull parameter attribute on the return. It doesn't look at operands.

> https://reviews.llvm.org/D24712
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160919/264650ad/attachment.html>

More information about the cfe-commits mailing list