From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11185 invoked by alias); 26 Mar 2004 20:18:36 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 11157 invoked from network); 26 Mar 2004 20:18:34 -0000 Received: from unknown (HELO mx2.redhat.com) (66.187.237.31) by sources.redhat.com with SMTP; 26 Mar 2004 20:18:34 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.11.6/8.11.6) with ESMTP id i2QJqOG03013; Fri, 26 Mar 2004 14:52:24 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i2QKIVM31766; Fri, 26 Mar 2004 15:18:31 -0500 Received: from p4 (vpn50-13.rdu.redhat.com [172.16.50.13]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i2QKITC06874; Fri, 26 Mar 2004 12:18:29 -0800 Subject: Re: Register Allocation From: Andrew MacLeod To: "Vladimir N. Makarov" Cc: John Lu , gcc mailing list In-Reply-To: <40648F84.5070704@redhat.com> References: <200403261954.i2QJsfT27909@dts0.lsil.com> <40648F84.5070704@redhat.com> Content-Type: multipart/mixed; boundary="=-Rf6IBakqTkpBSz8qirxJ" Date: Fri, 26 Mar 2004 22:26:00 -0000 Message-Id: <1080332310.12834.349.camel@p4> Mime-Version: 1.0 X-SW-Source: 2004-03/txt/msg01582.txt.bz2 --=-Rf6IBakqTkpBSz8qirxJ Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 1287 On Fri, 2004-03-26 at 15:16, Vladimir N. Makarov wrote: > John Lu wrote: > > >Hi, > > > >I've been working on a port based on gcc-3.3 and I've noticed that > >better assembly code is generated if the C source has > >separate variables declared for distinct live ranges. > > > > > > > Pesudo-register renaming is made by -fweb. It was written by Jan > Hubicka. Probably, this option should be set up by default (although > there is no practically improvement for SPECInt2000 for P4, some tests > are really faster). Another positive thing of usage this option is > better scheduling because of less anti-dependences. > tree-ssa will be doing this type of thing automatically shortly. Its a one line patch to enable it. (attached). I haven't turned it on yet because it can make a real mess of the debug information and we'd like to fix that :-). Andrew PS. tree-ssa optimizes that program to: foo1 (p1, p2) { int i.15; int total; int i; : total = 0; i = 0; :; total = *((int *)((unsigned int)i * 4) + p1) + total; i = i + 1; if (i <= 99) goto ; else goto ; :; i.15 = 0; :; total = *((int *)((unsigned int)i.15 * 4) + p1) + total; i.15 = i.15 + 2; if (i.15 <= 99) goto ; else goto ; :; return total; } --=-Rf6IBakqTkpBSz8qirxJ Content-Disposition: attachment; filename=DD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; name=DD; charset=ISO-8859-1 Content-length: 1032 * tree-ssa (rewrite_out_of_ssa): Disable coalescing of variables not related by a copy that share the same root variable. Index: tree-outof-ssa.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/gcc/gcc/gcc/Attic/tree-outof-ssa.c,v retrieving revision 1.1.2.1 diff -c -p -r1.1.2.1 tree-outof-ssa.c *** tree-outof-ssa.c 19 Mar 2004 02:07:25 -0000 1.1.2.1 --- tree-outof-ssa.c 24 Mar 2004 19:56:28 -0000 *************** rewrite_out_of_ssa (void) *** 1970,1977 **** { var_map map; int var_flags =3D 0; ! int ssa_flags =3D (SSANORM_REMOVE_ALL_PHIS | SSANORM_USE_COALESCE_LIST ! | SSANORM_COALESCE_PARTITIONS); =20=20 eliminate_virtual_phis (); =20=20 --- 1970,1976 ---- { var_map map; int var_flags =3D 0; ! int ssa_flags =3D (SSANORM_REMOVE_ALL_PHIS | SSANORM_USE_COALESCE_LIST); =20=20 eliminate_virtual_phis (); =20=20 --=-Rf6IBakqTkpBSz8qirxJ--