[PATCH] Add support for nonnull metadata on Loads

Nick Lewycky nlewycky at google.com
Mon Sep 8 13:20:32 PDT 2014


It would be an entirely new thing, but I would rather this be a
non-metadata attribute on loads, and support nonnull as well as
dereferenceable(n) and possibly other pointer attributes in the future.


On 5 September 2014 14:42, Philip Reames <listmail at philipreames.com> wrote:

> Hi hfinkel,
>
> This patch simply adds support for marking a load as returning a non-null
> pointer.  This is analogous to the existing nonnull return attribute, but
> it applies to specific load instructions instead.  The value of the load is
> allowed to vary between successive loads, but null is not a valid value to
> be loaded by any load marked nonnull.
>
> Hal - I'd particularly like your input here.  Is adding a parallel
> metadata construct to the existing attribute a reasonable idea?  Should we
> be uniform and accept the metadata on calls too?  Is there a better way to
> approach this.
>
> http://reviews.llvm.org/D5220
>
> Files:
>   lib/Analysis/ValueTracking.cpp
>   test/Transforms/InstSimplify/compare.ll
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140908/6e3a23dd/attachment.html>


More information about the llvm-commits mailing list