[PATCH] asan: do not instrument direct inbounds accesses to stack variables

Dmitry Vyukov dvyukov at google.com
Wed Feb 25 07:18:37 PST 2015


In http://reviews.llvm.org/D7583#129129, @zaks.anna wrote:

> How are you getting the speedup/size improvement measurements? Are these at -O1 or -O0?


I compiled a large program with -O2 and measured binary size difference.
Then compiled with -O2 and call threshold set to -1 and objdump -d | grep "call.*__asan_report_" | wc -l

> When comparing to my patch, the intend of this patch is to be more aggressive in removing bounds checking. My patch does not introduce any improvement at optimization levels higher than -O0 and is trying to simulate mem2reg. On the other hand, the analysis here are more aggressive in the checks it removes. For example, my patch would not remove provably in bounds array accesses with constant offset and it does not do anything for non-alloca values.

> 

> On the other hand, with my patch, the allocas that are known not to have instrumented accesses do not get poisoned. Currently, this patch is only targeting removal of bounds checking. Also, I am not sure what is the compile time overhead this brings and how reliable it is since I don't think ObjectSizeOffsetEvaluator is used much.

> 

> I preference is to have this on top of non-promotable allocas.


I am perfectly OK with it. But what do I know?


http://reviews.llvm.org/D7583

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






More information about the llvm-commits mailing list