<div dir="ltr">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.<br><div class="gmail_extra"><br><br><div class="gmail_quote">On 5 September 2014 14:42, Philip Reames <span dir="ltr"><<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi hfinkel,<br>
<br>
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.<br>
<br>
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.<br>
<br>
<a href="http://reviews.llvm.org/D5220" target="_blank">http://reviews.llvm.org/D5220</a><br>
<br>
Files:<br>
  lib/Analysis/ValueTracking.cpp<br>
  test/Transforms/InstSimplify/compare.ll<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div>