From patchwork Fri Jun 22 01:58:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 166460 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 B6609B6FAB for ; Fri, 22 Jun 2012 11:58:51 +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=1340935133; 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=Z2pFWRQJjFVm0zQ3p53C +UsK7uc=; b=pSGhH/tN88wUm9lfyMudvwBPy6bQzNynOgpm2U3LzKzkxLJTup/a yJSjGwz6vIUwkO0hl9Gljtea6LH2qDxgjAtrSw45FcvhTMzulcnSh5cDf0zIE/jY BhD+gTTipr9UQUv1yn7uWJalXaAPpsfTDEEYFvvCE/z2xeNvHF0PAak= 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=MhX3cM6wGnOwp+bHlKi6mhyGY2PlhnZaZNYTNQDDeqYGEP8iciARVxRQblxiu/ pG124f7p300k3VoH3SSpep8e4Cm+uyYEnvCMV8arHCHbMmkJ5KKxn5orhDcw8C5D S/R/7aOe6jU3rw+s+MSBU4FxBdEhAtJo0l2YM40ejfOBk=; Received: (qmail 26036 invoked by alias); 22 Jun 2012 01:58:43 -0000 Received: (qmail 25972 invoked by uid 22791); 22 Jun 2012 01:58:32 -0000 X-SWARE-Spam-Status: No, hits=-5.6 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, 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; Fri, 22 Jun 2012 01:58:12 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q5M1wBOG027875 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Jun 2012 21:58:11 -0400 Received: from freie (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q5M1w9Y1026225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Jun 2012 21:58:11 -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 q5M1w8hm021875; Thu, 21 Jun 2012 22:58:08 -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 q5M1w6kI029878; Thu, 21 Jun 2012 22:58:06 -0300 Received: (from aoliva@localhost) by livre.localdomain (8.14.3/8.14.3/Submit) id q5M1w57S029876; Thu, 21 Jun 2012 22:58:05 -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: Thu, 21 Jun 2012 22:58:05 -0300 In-Reply-To: (Alexandre Oliva's message of "Wed, 20 Jun 2012 00:52:12 -0300") 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 Here's one more patch that addresses a problem I found out while investigating the PR53671 regressions: rather than recording incoming stack args as MEMs with non-VALUE expressions, it's more consistent (and less surprising) if we emit them as VALUE expressions, like other MEMs. Regstrapped on x86_64-linux-gnu and i686-linux-gnu. Ok? for gcc/ChangeLog from Alexandre Oliva * var-tracking.c (vt_add_function_parameter): Use a preserved VALUE for the MEM address of an incoming parameter. Index: gcc/var-tracking.c =================================================================== --- gcc/var-tracking.c.orig 2012-06-21 22:26:01.341145372 -0300 +++ gcc/var-tracking.c 2012-06-21 22:26:09.644487877 -0300 @@ -9454,6 +9454,17 @@ vt_add_function_parameter (tree parm) VAR_INIT_STATUS_INITIALIZED, NULL, INSERT); dv = dv_from_value (val->val_rtx); } + + if (MEM_P (incoming)) + { + val = cselib_lookup_from_insn (XEXP (incoming, 0), mode, true, + VOIDmode, get_insns ()); + if (val) + { + preserve_value (val); + incoming = replace_equiv_address_nv (incoming, val->val_rtx); + } + } } if (REG_P (incoming))