From patchwork Tue Nov 6 01:20:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 197381 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 5921C2C0089 for ; Tue, 6 Nov 2012 12:20:57 +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=1352769658; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=a1ecGjE DC1dGFOcHJLCcVjrhWIA=; b=PTTwLCAkV0zuxu7DFaWzFOBUzTv9vy9Uz5SAD5J AnhVVNZ0ASQkrNYvN0Zuw+HPwbg2mKhfU8a94rcnrlfGv9k48/DIpTb8RHO+MgHU 5nFi69kC7iFHZwrabsxQ4s+7UX9OV+aRbQG9MnW6BOxzWNY0dUjHqUe3pbGZSSz3 WrRw= 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:Date:Message-ID:Subject:From:To:Content-Type:X-System-Of-Record:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=eOhMfGWb0GZE7Z0d7VN5uKmdjmeiOzReZES7JsBQMCOZeSMnh/XwMEkRoB/vYn VbZOpWQ/O7nsxiceZt/VvCir0B0VY0b5zpW2IPnPYsPpwQCYOzPqsTbObZ0RLzf4 wOLRdjHFZVG7nc80IWuAESfk9PpV7wJsRXmM7qm5Pl6rg=; Received: (qmail 9112 invoked by alias); 6 Nov 2012 01:20:54 -0000 Received: (qmail 9104 invoked by uid 22791); 6 Nov 2012 01:20:53 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, TW_TM X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Nov 2012 01:20:48 +0000 Received: by mail-pb0-f47.google.com with SMTP id ro12so4117159pbb.20 for ; Mon, 05 Nov 2012 17:20:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-system-of-record:x-gm-message-state; bh=M9QiScZCPD4MS0lwqquyz0YXjLxOUeuob8MU9vgx/ac=; b=O5JwmXJokoJoX7ZRSjkxBOXuNXpREM8gf85BXh95ghnD7GWrJEnlCIyefbRImdYEYK EtS14wG2dy68bJm299MUJb+ugdRGzylRr12wi44PpMU3dXXEGn5bqqg758eMcBQNdZG5 mrW4pv8PBuYo1/MS34zshp/NR+mDK9P4bZkSwBlTjCPtOPxxbzUNJlZcYnY4S3NhxEgl tJ2MNVNHXe0T6NP+gDZ4Puk73XgIGG9dhjSanNnCH+csNjmsNW+6CST+mHfNNk1+m5KE SMIWurFiKNApVzORaRpkdbysuy4TQObQ1CYBSKKNR8AKYBTWdV7ZOfIqHJmpHbIUeDpj hCNg== MIME-Version: 1.0 Received: by 10.66.85.10 with SMTP id d10mr33359005paz.52.1352164847772; Mon, 05 Nov 2012 17:20:47 -0800 (PST) Received: by 10.68.49.232 with HTTP; Mon, 5 Nov 2012 17:20:47 -0800 (PST) Date: Mon, 5 Nov 2012 17:20:47 -0800 Message-ID: Subject: [PATCH] Cleanup last_location and update input_location in ipa_prop From: Dehao Chen To: GCC Patches X-System-Of-Record: true X-Gm-Message-State: ALoCoQli5hb5qvJUb+5A3D4ike3eopww2L7n9bJqpkvLjNm/b65UCpVqX0cjVAPVet+ACEYGEnJPD/agN2Hz/F+n7v/FnzH6kBi/CbgZQBJrZYOXLS1t9adHdUAlXY34zj8gl4UJp/ZK/tOfU+b6FMzoOqiaoDv5I1n6oK5uiYh0hLuZ1hy7jQYVNVM2mR8AksV9mHRQyEuZ 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 Hi, This is a patch to do some obvious cleanup and setting correct input_location in ipa_prop (because it invokes gimplification routines). Bootstrapped and passed gcc regression tests. Is it okay for trunk? Thanks, Dehao gcc/ChangeLog: 2010-11-05 Dehao Chen * ipa-prop.c (ipa_modify_call_arguments): Set input_location so that gimplification routines can have right location. * emit-rtl.c (last_location): Remove unused variable. Index: gcc/ipa-prop.c =================================================================== --- gcc/ipa-prop.c (revision 193174) +++ gcc/ipa-prop.c (working copy) @@ -2826,7 +2826,9 @@ ipa_modify_call_arguments (struct cgraph_edge *cs, gimple_stmt_iterator gsi; tree callee_decl; int i, len; + location_t saved_location = input_location; + input_location = gimple_location (stmt); len = VEC_length (ipa_parm_adjustment_t, adjustments); vargs = VEC_alloc (tree, heap, len); callee_decl = !cs ? gimple_call_fndecl (stmt) : cs->callee->symbol.decl; @@ -3004,6 +3006,7 @@ ipa_modify_call_arguments (struct cgraph_edge *cs, if (cs) cgraph_set_call_stmt (cs, new_stmt); update_ssa (TODO_update_ssa); + input_location = saved_location; free_dominance_info (CDI_DOMINATORS); } Index: gcc/emit-rtl.c =================================================================== --- gcc/emit-rtl.c (revision 193174) +++ 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. */