[PATCH] Skip promotable allocas to improve performance at -O0

Dmitry Vyukov dvyukov at google.com
Fri Feb 20 09:51:54 PST 2015


Smart people, while you are here I would like to ask you to look at:
http://reviews.llvm.org/D7583
It is somewhat similar to this change. I want to eliminate
instrumentation of locals within its lifetime (so it is not a
use-after-scope) and that is known to be inbounds (that is, direct
accesses, field accesses and array element accesses with constant
indices; so it is not a out-of-bounds).
By experimentation I found that both isGEPWithNoNotionalOverIndexing
and stripInBoundsConstantOffsets don't do what I want.
isGEPWithNoNotionalOverIndexing does not eliminate enough of
unnecessary instrumentation. While stripInBoundsConstantOffsets
eliminates a bit more than necessary.
Thanks in advance!


On Fri, Feb 20, 2015 at 6:08 AM, Kostya Serebryany <kcc at google.com> wrote:
>> > With this patch, ASan instrumentation pass will only instrument non promotable allocas, giving us a speedup of 39% on a collection of benchmarks with -O0
>
>>
>
>
> I wonder, what if we apply this only to those allocas that are indexed with constants?
> I.e. only if we can statically prove the correctness of access.
> See also Dmitry's http://reviews.llvm.org/D7583
>
>
> http://reviews.llvm.org/D7741
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>



More information about the llvm-commits mailing list