From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123812 invoked by alias); 2 Dec 2015 09:15:32 -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 123791 invoked by uid 89); 2 Dec 2015 09:15:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Wed, 02 Dec 2015 09:15:31 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id CE8A9C0CC657; Wed, 2 Dec 2015 09:15:29 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-34.ams2.redhat.com [10.36.116.34]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB29FSpo012402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 2 Dec 2015 04:15:29 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id tB29FQGm003768; Wed, 2 Dec 2015 10:15:27 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id tB29FJhd003767; Wed, 2 Dec 2015 10:15:19 +0100 Date: Wed, 02 Dec 2015 09:15:00 -0000 From: Jakub Jelinek To: Richard Biener Cc: Jan Hubicka , gcc-patches@gcc.gnu.org Subject: Re: -fstrict-aliasing fixes 4/6: do not fiddle with flag_strict_aliasing when expanding debug locations Message-ID: <20151202091519.GB5675@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20151202080706.GA92803@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00211.txt.bz2 On Wed, Dec 02, 2015 at 10:05:13AM +0100, Richard Biener wrote: > On Wed, 2 Dec 2015, Jan Hubicka wrote: > > > Hi, > > this patch removes flag_strict_aliasing kludge in expanding debug locations and > > instead it introduces explicit parameter DEBUG that makes > > set_mem_attributes_minus_bitpos to not affect alias sets. This is sanity > > checked by comparing number of alias sets before and after at a time we > > originally overwritten flag_strict_aliasing. > > > > I also added code to prevent memory attributes creation for !optimize and to > > avoid get_alias_set computation for !flag_strict_aliasing. This slightly > > optimizes -O0 builds but the results seems to be down in the noise (I would not > > object to leave it out). > > > > The patch should fix at least one (latent?) bug that call_stmt expansion > > invoke expand_debug_expr without clearing flag_strict_aliasing. > > > > Bootstrapped/regtested x86_64-linux, also tested with compare-debug, OK? > > First of all, why do debug MEMs need mem-attrs? For aliasing purposes, like any other MEMs. var-tracking needs to be able to find out if some store through say some pointer could alias certain debug MEM (then we need to flush the corresponding VALUEs), or not (then that VALUE can be still considered live at that MEM location). Jakub