On 11/25/2014 08:06 PM, Yury Gribov wrote: > This patch improves current optimization of ASAN_CHECKS performed by > sanopt pass. In addition to searching the sanitized pointer in > asan_check_map, it also tries to search for definition of this pointer. > This allows more checks to be dropped when definition is not a gimple > value (e.g. load from struct field) and thus cannot be propagated by > forwprop. > > In my experiments this rarely managed to remove more than 0.5% of > ASAN_CHECKs but some files got as much as 1% improvement e.g. > * gimple.c: 49 (out of 5293) > * varasm.c: 42 (out of 3678) > > For a total it was able to remove 2657 checks in Asan-bootstrapped GCC > (out of ~500K). Hi all, Here is the updated version of the patch. Asan-bootstrapped, bootstrapped and regtested on x64. Marek, do you think similar optimization may be useful for UBSan? -Y