<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 26, 2015 at 4:20 PM, Anna Zaks <span dir="ltr"><<a href="mailto:zaks.anna@gmail.com" target="_blank">zaks.anna@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2) When we are at the point where we look only at provably safe memory accesses, we could just mark allocas as interesting as we are walking the memory operations and deciding which ones to instrument. There would be no need to look at uses twice in that case. (I guess, there is no need for that now either other than I'd prefer to just call the existing isAllocaPromotable rather than migrating that functionality into the ASan pass.) </blockquote></div><br>This seems good.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Note that the use-list walk for isAllocaPromotable is much less worrisome because it exits early in almost every case. The place where repeated use-list walking is bad (IMO) is when you need to prove that a particular kind of use (escape perhaps) never happens for an alloca which is used in *very* complex code (many 10s of 1000s of GEPs within large loop bodies for example due to inlining and/or template expansion).</div></div>