From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23787 invoked by alias); 8 Aug 2014 10:37:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 23776 invoked by uid 89); 8 Aug 2014 10:37:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 08 Aug 2014 10:37:53 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s78AbpLD014715 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 8 Aug 2014 06:37:51 -0400 Received: from tucnak.zalov.cz (ovpn-116-34.ams2.redhat.com [10.36.116.34]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s78Abmo3018460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 8 Aug 2014 06:37:50 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.8/8.14.7) with ESMTP id s78AblXu015883; Fri, 8 Aug 2014 12:37:47 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.8/8.14.8/Submit) id s78AbjPv015882; Fri, 8 Aug 2014 12:37:45 +0200 Date: Fri, 08 Aug 2014 10:37:00 -0000 From: Jakub Jelinek To: Yury Gribov Cc: GCC Patches , Marek Polacek , Konstantin Serebryany , Dmitry Vyukov , Dodji Seketeli , Yuri Gribov , Viacheslav Garbuzov Subject: Re: [PATCH] Asan static optimization (draft) Message-ID: <20140808103744.GP7393@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <53E4A5D1.8050007@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53E4A5D1.8050007@samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00884.txt.bz2 On Fri, Aug 08, 2014 at 02:26:25PM +0400, Yury Gribov wrote: > I have been working on Asan global optimization pass lately. The goal is to > remove redundant Asan checks from sanitized code. This should hopefully > reduce Asan's speed/size overhead (which is currently ~2x). The patch is not > yet ready for trunk (e.g. I haven't done bootstrap, etc. but Asan testsuite > passed wo errors) but I thought I'd send it for preliminary review of > algorithm and data structures (*). Thanks for working on it, I've just quickly skimmed it and it looks reasonable. Similar optimization could be used for tsan builtins, or some of the ubsan builtins (which is the reason why the pass is called sanopt). > 3) in addition to redundant check removal, we could also move duplicate > checks from e.g. branches of if-statement to their dominators. For that you'd need to be extra careful, you would need to avoid doing that if any path doesn't contain the check, or if there are calls that e.g. could not return (abort/exit/have infinite loop) in between, etc. Jakub