[PATCH] [asan] Speed up interesting alloca checks

Kostya Serebryany kcc at google.com
Thu Mar 26 14:17:34 PDT 2015


In http://reviews.llvm.org/D8639#147540, @zaks.anna wrote:

> > This looks fine, but I would slightly prefer to compute the map beforehand instead of caching, if possible. 
>
> >  I.e. instead of a map of ProcessedAllocas have a set of InterestingAllocas that is computed in visitAllocaInst
>
>
> In the future, determining if an alloca is interesting or not might depend on visiting all of its uses. For example, if an alloca is promotable but all of it's uses are accessing memory, which is provably in range, it should be marked as non-interesting. The current approach seems to fit that model better than visiting allocas and building a list.


But you can also visit all uses in a pre-compute step too. 
And having this pre-computed instead of cached will make the code simpler to understand.


http://reviews.llvm.org/D8639

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list