[PATCH] [asan] Speed up interesting alloca checks

Chandler Carruth chandlerc at google.com
Thu Mar 26 16:26:11 PDT 2015


On Thu, Mar 26, 2015 at 4:20 PM, Anna Zaks <zaks.anna at gmail.com> wrote:

> 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.)


This seems good.

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).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150326/e239ce19/attachment.html>


More information about the llvm-commits mailing list