From patchwork Fri Sep 16 07:04:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 114893 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 9ABAAB70D6 for ; Fri, 16 Sep 2011 17:05:18 +1000 (EST) Received: (qmail 29202 invoked by alias); 16 Sep 2011 07:05:16 -0000 Received: (qmail 29186 invoked by uid 22791); 16 Sep 2011 07:05:15 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS, 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, 16 Sep 2011 07:05:00 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8G74xZe012456 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 16 Sep 2011 03:04:59 -0400 Received: from freie.oliva.athome.lsd.ic.unicamp.br (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p8G74vhS025832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 16 Sep 2011 03:04:59 -0400 Received: from livre.localdomain (livre-to-gw.oliva.athome.lsd.ic.unicamp.br [172.31.160.19]) by freie.oliva.athome.lsd.ic.unicamp.br (8.14.4/8.14.4) with ESMTP id p8G74urN020984 for ; Fri, 16 Sep 2011 04:04:56 -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 p8G74t1n014322; Fri, 16 Sep 2011 04:04:55 -0300 Received: (from aoliva@localhost) by livre.localdomain (8.14.3/8.14.3/Submit) id p8G74sNp014320; Fri, 16 Sep 2011 04:04:54 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Subject: do not copy DEBUG_EXPRs in copy_insn Date: Fri, 16 Sep 2011 04:04:54 -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 copy_rtx avoids duplicating DEBUG_EXPRs, so that they map one-to-one to DEBUG_EXPR_DECLs, but copy_insn lacks these smarts. This was exposed by a patch I'm working on, that uses RTL flags in DEBUG_EXPRs to speed up expansion of var location notes within var-tracking. Regstrapped on i686-pc-linux-gnu and x86_64-linux-gnu. Ok to install? for gcc/ChangeLog from Alexandre Oliva * emit-rtl.c (copy_insn_1): Do not copy DEBUG_EXPRs. Index: gcc/emit-rtl.c =================================================================== --- gcc/emit-rtl.c.orig 2011-09-15 03:51:41.982777588 -0300 +++ gcc/emit-rtl.c 2011-09-15 03:51:50.767633680 -0300 @@ -5269,6 +5269,7 @@ copy_insn_1 (rtx orig) switch (code) { case REG: + case DEBUG_EXPR: case CONST_INT: case CONST_DOUBLE: case CONST_FIXED: