From patchwork Mon Nov 26 22:54:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 202041 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 D7A9F2C0085 for ; Tue, 27 Nov 2012 09:55:06 +1100 (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=1354575308; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=jrx3MFIZ5B0muYmQXzvpo0L/DXY=; b=rmw/uaietj3Jp+tlwVdW39cjr9c3NocWiMqxFq4O1e8NCf7UQOP0aOrbbX2UId rOK1DkXLAATRvv5ECqghXd/U31MNkU/1NOJqYviZQDL9twLt+moPkCS35Jve72Bj UnDQFkCmAxouMF9SozzWoPfhpemzwwfcoqTlYVU1zk0Wk= 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:X-Google-DKIM-Signature:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=k4hmwBYLpx2NEpLNkO1M4FYgH4fXKVhHJimXLZRHJhjU3OOfZoBV/ZUxu31wxi 8pF/bqVNB+GcdWK/88069S1cwlWTooDlqDDalj2dP0EbKVo6L7xHZ1dDWR4ERMvj ngYjA/iAiDOPl42ODkcJ/Dt+YJQYcGW+Rd8G0nv1R5vLo=; Received: (qmail 15095 invoked by alias); 26 Nov 2012 22:55:02 -0000 Received: (qmail 15078 invoked by uid 22791); 26 Nov 2012 22:55:01 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-da0-f47.google.com (HELO mail-da0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Nov 2012 22:54:57 +0000 Received: by mail-da0-f47.google.com with SMTP id s35so1883804dak.20 for ; Mon, 26 Nov 2012 14:54:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=IrXohWFJeJjgEsXbobictwQ0ek5hv6ODRcWQP6K6zzU=; b=fSB2Dbd7h1icDh8qxnpHJ1Y9igci0GXlLOIoR18pdOqh+Nu0Mq/7unrrAtcbDXGSBw IVXuz+0ciAjcJk2hkrp1UPyi6anhLwU/bCFJaYPUnOkwwp8JhNYrezPUA9dfnZDrISfl P3aBUNXzVhY+EJVSXV3TBlf1Oq2gg7rH5O7wuML5QSDhjgDrvM292ZDIYNxc3CtJNvUp wXqXo6iTFqyiIBzd5Ez++UEHjo8EZdDm3N6Ums6HDeY1uic0CLcV8rNYhyJpKqXRebHn bf+UfffYozPx2ewThe7AkQvWHl5K4kqjIgHwiNbLLfUjfjYGLheH+sYrh87wNrY295Ag WGMA== MIME-Version: 1.0 Received: by 10.68.204.103 with SMTP id kx7mr42283060pbc.33.1353970496543; Mon, 26 Nov 2012 14:54:56 -0800 (PST) Received: by 10.68.49.232 with HTTP; Mon, 26 Nov 2012 14:54:56 -0800 (PST) In-Reply-To: References: Date: Mon, 26 Nov 2012 14:54:56 -0800 Message-ID: Subject: Re: [PATCH] Cleanup last_location and update input_location in ipa_prop From: Dehao Chen To: Richard Biener Cc: GCC Patches X-Gm-Message-State: ALoCoQnBBaKLZXxF6DBfUMupE6UjbkfauUqlXNXC5Ww4ZHknbrTPKrd+xdZGeosYI3HpNUfDcjWpVw8Gw/8hobx8tBAJszdC2hvvsLMRh9XdkYmMn7E8q8bnpg1iQPfL46/xOXSctAr8dCMuKviqt5bG0L2WWzvJMwRufKmvWSKCQqoMq1sVT3v3N4SOX5NOE0reefCbZhmO X-IsSubscribed: yes 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 The new patch is attached. Bootstrapped and passed gcc regression test. Ok for trunk? Thanks, Dehao gcc/ChangeLog: 2010-11-05 Dehao Chen * ipa-prop.c (ipa_modify_call_arguments): Set loc correctly. * emit-rtl.c (last_location): Remove unused variable. Index: gcc/emit-rtl.c =================================================================== --- gcc/emit-rtl.c (revision 193203) +++ gcc/emit-rtl.c (working copy) @@ -5937,7 +5937,7 @@ location_t epilogue_location; /* Hold current location information and last location information, so the datastructures are built lazily only when some instructions in given place are needed. */ -static location_t curr_location, last_location; +static location_t curr_location; /* Allocate insn location datastructure. */ void @@ -5945,7 +5945,6 @@ insn_locations_init (void) { prologue_location = epilogue_location = 0; curr_location = UNKNOWN_LOCATION; - last_location = UNKNOWN_LOCATION; } /* At the end of emit stage, clear current location. */ Index: gcc/ipa-prop.c =================================================================== --- gcc/ipa-prop.c (revision 193203) +++ gcc/ipa-prop.c (working copy) @@ -2870,7 +2870,8 @@ ipa_modify_call_arguments (struct cgraph_edge *cs, gcc_checking_assert (adj->offset % BITS_PER_UNIT == 0); base = gimple_call_arg (stmt, adj->base_index); - loc = EXPR_LOCATION (base); + loc = DECL_P (base) ? DECL_SOURCE_LOCATION (base) + : EXPR_LOCATION (base); if (TREE_CODE (base) != ADDR_EXPR && POINTER_TYPE_P (TREE_TYPE (base)))