From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9343 invoked by alias); 16 Oct 2012 17:02:14 -0000 Received: (qmail 9324 invoked by uid 22791); 16 Oct 2012 17:02:10 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Tue, 16 Oct 2012 17:02:01 +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 q9GH1xQX011560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 16 Oct 2012 13:01:59 -0400 Received: from stumpy.slc.redhat.com (ovpn-113-122.phx2.redhat.com [10.3.113.122]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q9GH1r5r017036; Tue, 16 Oct 2012 13:01:58 -0400 Message-ID: <507D930D.5090703@redhat.com> Date: Tue, 16 Oct 2012 17:08:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Bin Cheng CC: "'Steven Bosscher'" , gcc-patches@gcc.gnu.org Subject: Re: [PATCH RFA] Implement register pressure directed hoist pass References: <50655073.e54c420a.651e.ffffac0fSMTPIN_ADDED@mx.google.com> <506AE4F1.5030807@redhat.com> <50766d69.a853420a.2475.fffffbafSMTPIN_ADDED@mx.google.com> <000c01cda850$d6fa2460$84ee6d20$@cheng@arm.com> <001f01cdab72$0979efa0$1c6dcee0$@cheng@arm.com> In-Reply-To: <001f01cdab72$0979efa0$1c6dcee0$@cheng@arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg01564.txt.bz2 On 10/16/2012 01:44 AM, Bin Cheng wrote: > Hi Steven, Jeff, > I found a flaw in original patch, which results in inaccurate register > pressure. > Here comes the updated patches, improving code size a little bit on > Thumb2/powerpc comparing to original patches. > Please review. > > Thanks > > 2012-10-16 Bin Cheng > > * gcse.c: Update copyright dates. > (hoist_expr_reaches_here_p): Change parameter type from char * > to sbitmap. > > 2012-10-16 Bin Cheng > > * common.opt (flag_ira_hoist_pressure): New. > * doc/invoke.texi (-fira-hoist-pressure): Describe. > * ira-costs.c (ira_set_pseudo_classes): New parameter. > * ira.h: Update copyright dates. > (ira_set_pseudo_classes): Update prototype. > * haifa-sched.c (sched_init): Update call. > * ira.c (ira): Update call. > * regmove.c: Update copyright dates. > (regmove_optimize): Update call. > * loop-invariant.c: Update copyright dates. > (move_loop_invariants): Update call. > * gcse.c: (struct bb_data): New structure. > (BB_DATA): New macro. > (curr_bb, curr_reg_pressure): New static variables. > (should_hoist_expr_to_dom): Rename from hoist_expr_reaches_here_p. > Change parameter expr_index to expr. > New parameters pressure_class, nregs and hoisted_bbs. > Use reg pressure to determine the distance expr can be hoisted. > (hoist_code): Use reg pressure to direct the hoist process. > (get_regno_pressure_class, get_pressure_class_and_nregs) > (change_pressure, calculate_bb_reg_pressure): New. > (one_code_hoisting_pass): Calculate register pressure. Allocate > and free data. > + > + /* Currently register pressure for each pressure class. */ > + static int curr_reg_pressure[N_REG_CLASSES]; "Currently" -> "Current" OK for the mainline sources. Thanks for your patience, Jeff