From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28149 invoked by alias); 15 Aug 2014 06:59:46 -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 28139 invoked by uid 89); 15 Aug 2014 06:59:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f175.google.com Received: from mail-we0-f175.google.com (HELO mail-we0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 15 Aug 2014 06:59:44 +0000 Received: by mail-we0-f175.google.com with SMTP id t60so1977680wes.6 for ; Thu, 14 Aug 2014 23:59:41 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.181.8.75 with SMTP id di11mr48268741wid.15.1408085981465; Thu, 14 Aug 2014 23:59:41 -0700 (PDT) Received: by 10.194.187.212 with HTTP; Thu, 14 Aug 2014 23:59:41 -0700 (PDT) In-Reply-To: References: <53E4A5D1.8050007@samsung.com> <20140808103744.GP7393@tucnak.redhat.com> Date: Fri, 15 Aug 2014 06:59:00 -0000 Message-ID: Subject: Re: [PATCH] Asan static optimization (draft) From: Yuri Gribov To: Dmitry Vyukov Cc: Jakub Jelinek , Yury Gribov , GCC Patches , Marek Polacek , Konstantin Serebryany , Dodji Seketeli , Viacheslav Garbuzov Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-08/txt/msg01548.txt.bz2 On Fri, Aug 8, 2014 at 2:43 PM, Dmitry Vyukov wrote: >> Similar optimization could be used for tsan builtins, or some of the ubsan >> builtins (which is the reason why the pass is called sanopt). > > That would be great. > Note that tsan optimizations must be based around a different > criteria. Any unlock/release operations must reset set of already > checked locations. Right, I think the general algorithm should be quite similar, only the KILL sets and actual check instructions would be different. Unfortunately I don't (yet) have any experience neither with TSan, nor with UBSan so I'd prefer to leave their optimization for future. The code should be straightforward to adapt (via templating or callbacking in couple of places). -Y