<div dir="ltr"><div><div><span style="font-size:12.8px">Unless i'm missing something, this is not the correct handling. Happy to be convinced.</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">The normal behavior (and that specified in the papers) is to treat malloc as if it output the address of a unique variable.<div><br></div><div>This is because while it introduces no aliases itself, it does introduce a variable that can be aliased.</div></div><div style="font-size:12.8px">If that variable is reached through other mechanisms, it may be an alias :)</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">If you say they do *nothing*, as you've done here, nothing will ever alias the result of malloc, even something that *should*.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Am i missing something?</div><div style="font-size:12.8px"><br></div><div class="" style="margin:2px 0px 0px;font-size:12.8px"></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 28, 2016 at 2:32 PM, Jia Chen via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">grievejia created this revision.<br>
grievejia added reviewers: george.burgess.iv, hfinkel.<br>
grievejia added a subscriber: llvm-commits.<br>
<br>
Cfl-aa used to bail out and make the most conservative assumption on any external library functions (any input or output parameter may alias just about anything). This patch tries to make it less conservative when seeing an external function that allocate/deallocate heap memory, e.g. malloc(), calloc(), and free().<br>
<br>
<a href="http://reviews.llvm.org/D20776" rel="noreferrer" target="_blank">http://reviews.llvm.org/D20776</a><br>
<br>
Files:<br>
  include/llvm/Analysis/CFLAliasAnalysis.h<br>
  lib/Analysis/CFLAliasAnalysis.cpp<br>
<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>