On Wed, Dec 03, 2014 at 11:09:41AM +0300, Yury Gribov wrote: > >From 5a9ede4d120ba4e39ca47e212262af53de47eb5a Mon Sep 17 00:00:00 2001 > From: Yury Gribov <y.gri...@samsung.com> > Date: Tue, 25 Nov 2014 11:49:11 +0300 > Subject: [PATCH] 2014-12-02 Yury Gribov <y.gri...@samsung.com> > > gcc/ > * asan.h (asan_can_optimize_checks): New function. > * asan.c (update_mem_ref_hash_table): Disable if can't optimize. > * sanopt.c (maybe_get_single_definition): New function. > (can_remove_asan_check): Ditto. > (struct tree_map_traits): New struct. > (struct sanopt_ctx): Use custom traits for asan_check_map. > (maybe_get_dominating_check): New function. > (maybe_optimize_ubsan_null_ifn): Move code to > maybe_get_dominating_check. > (maybe_optimize_asan_check_ifn): Move code and take non-SSA expressions > into account when optimizing. > (sanopt_optimize_walker): Move code to asan_can_optimize_checks.
I thought I've agreed that we can optimize checks away for asan even when recovering. The patch is ok for trunk anyway, we can perhaps make it tunable later, or define asan_can_optimize_checks to true unconditionally. Jakub