From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3402 invoked by alias); 31 Oct 2014 19:51:48 -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 3391 invoked by uid 89); 31 Oct 2014 19:51:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.5 required=5.0 tests=AWL,BAYES_40,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL,URI_HEX autolearn=no version=3.3.2 X-HELO: sam.nabble.com Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 31 Oct 2014 19:51:46 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1XkIEa-0002sf-M0 for gcc-patches@gcc.gnu.org; Fri, 31 Oct 2014 12:51:44 -0700 Date: Fri, 31 Oct 2014 19:54:00 -0000 From: ygribov To: gcc-patches@gcc.gnu.org Message-ID: In-Reply-To: <20141031091815.GM20462@redhat.com> References: <20141030184752.GF20462@redhat.com> <20141031091815.GM20462@redhat.com> Subject: Re: [PATCH] Optimize UBSAN_NULL checks MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2014-10/txt/msg03365.txt.bz2 On Fri, Oct 31, 2014 at 12:19 PM, Marek Polacek-3 [via gcc] wrote: > On Thu, Oct 30, 2014 at 07:47:52PM +0100, Marek Polacek wrote: > >> This patch tries to optimize away redundant UBSAN_NULL checks. >> It walks the statements, looks for UBSAN_NULL calls and keeps >> track of pointers and statements checking that pointer in a >> hash map. Now, if we can prove that some UBSAN_NULL stmt is >> dominated by other one which requires the same or less strict >> alignment, there's no point in keeping this check around and >> expanding it. >> >> optimize_checks should be enhanced to handle other {ub,a,t}san >> checks as well - which is what I'm going to work on next. > > (Strike this version. I'm working on a variant that walks the dominator > tree first to get better optimizations.) Just curious how much speedup did you get from this? I've tried similar optimizations and got pitiful 3% speedup. -Y -- View this message in context: http://gcc.1065356.n5.nabble.com/PATCH-Optimize-UBSAN-NULL-checks-tp1084891p1085286.html Sent from the gcc - patches mailing list archive at Nabble.com.