From patchwork Wed Jun 20 03:52:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 165872 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id D3746B700C for ; Wed, 20 Jun 2012 13:52:47 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1340769168; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:From:To:Cc:Subject:References:Date: In-Reply-To:Message-ID:User-Agent:MIME-Version:Content-Type: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=6bjtWa9rOuYWGUTuoGe4 A1VK+ZA=; b=LJCbX7Sf+MUFk6M+BkGVE+/j29k/7pErxJrmNYc9telFN1abZnQa mjQWw3GHKN4VgxHCJZx9Ps/FhBE1HZEYdBamhuSx1puj30asIFlgISdrYa2923LH 31Pc7uSRw3ntYxzp66EutIGknMuJncOhY/4dOK6gssVmGX7IQcAQC7o= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Received:From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=SKcs7zhH63x6h8hkAGC8hu+n6oXAXXFHt3NuAEAykjsaLske350QZm5MT3CfHT Op12cfJUiXJIS+eNw8IrQkdeUy6UFpGhgdlmLo1uTvEKRK3UsnVXOjrcvEXm7JXS j8feWb6TGXJmb/y09B6Xc8jzb7DcSrkCwvOQgJfloSzSg=; Received: (qmail 16423 invoked by alias); 20 Jun 2012 03:52:41 -0000 Received: (qmail 16412 invoked by uid 22791); 20 Jun 2012 03:52:39 -0000 X-SWARE-Spam-Status: No, hits=-5.5 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Jun 2012 03:52:19 +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 (8.14.4/8.14.4) with ESMTP id q5K3qJX4002010 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 19 Jun 2012 23:52:19 -0400 Received: from freie (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q5K3qGTx011672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Jun 2012 23:52:18 -0400 Received: from livre.localdomain (livre-to-gw.oliva.athome.lsd.ic.unicamp.br [172.31.160.19]) by freie (8.14.5/8.14.5) with ESMTP id q5K3qEM4029723; Wed, 20 Jun 2012 00:52:15 -0300 Received: from livre.localdomain (aoliva@localhost.localdomain [127.0.0.1]) by livre.localdomain (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q5K3qEmn005818; Wed, 20 Jun 2012 00:52:14 -0300 Received: (from aoliva@localhost) by livre.localdomain (8.14.3/8.14.3/Submit) id q5K3qDsu005816; Wed, 20 Jun 2012 00:52:13 -0300 From: Alexandre Oliva To: "H.J. Lu" Cc: Richard Henderson , Jakub Jelinek , gcc-patches@gcc.gnu.org Subject: Re: [PR49888, VTA] don't keep VALUEs bound to modified MEMs References: <20120523101349.GN16117@tyan-ft48-01.lab.bos.redhat.com> <4FD7A9BE.4080405@redhat.com> Date: Wed, 20 Jun 2012 00:52:12 -0300 In-Reply-To: (H. J. Lu's message of "Sat, 16 Jun 2012 13:10:18 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Jun 16, 2012, "H.J. Lu" wrote: > If I understand it correctly, the new approach fails to handle push > properly. It's actually cselib that didn't deal with push properly, so it thinks incoming stack arguments may be clobbered by them. But that's not the whole story, unfortunately. I still don't have a complete fix for the problem, but I have some patches that restore nearly all of the passes. The first one extends RTX alias analysis so that cselib can recognize that (mem:SI ARGP) and (mem:SI (plus (and (plus ARGP #-4) #-32) #-4)) don't alias. Before the patch, we'd go for infinite sized objects upon AND. The second introduces an entry-point equivalence between ARGP and SP, so that SP references in push and stack-align sequences can be canonicalized to ARGP-based. The third introduces address canonicalization that uses information in the dataflow variable set in addition to the static cselib table. This is the one I'm still working on, because some expressions still fail to canonicalize to ARGP although they could. The fourth removes a now-redundant equivalence from the dynamic table; the required information is always preserved in the static table. I've regstrapped (and checked results! :-) all of these on x86_64-linux-gnu and i686-linux-gnu. It fixes all visible regressions in x86_64-linux-gnu, and nearly all on i686-linux-gnu. May I check these in and keep on working to complete the fix, or should I revert the original patch and come back only with a patchset that fixes all debug info regressions? for gcc/ChangeLog from Alexandre Oliva PR debug/53671 PR debug/49888 * var-tracking.c (vt_init_cfa_base): Drop redundant recording of CFA base. Index: gcc/var-tracking.c =================================================================== --- gcc/var-tracking.c.orig 2012-06-18 08:44:13.459569497 -0300 +++ gcc/var-tracking.c 2012-06-18 08:55:31.023984364 -0300 @@ -9582,9 +9582,6 @@ vt_init_cfa_base (void) VOIDmode, get_insns ()); preserve_value (val); cselib_preserve_cfa_base_value (val, REGNO (cfa_base_rtx)); - var_reg_decl_set (&VTI (ENTRY_BLOCK_PTR)->out, cfa_base_rtx, - VAR_INIT_STATUS_INITIALIZED, dv_from_value (val->val_rtx), - 0, NULL_RTX, INSERT); } /* Allocate and initialize the data structures for variable tracking