From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15197 invoked by alias); 29 Dec 2002 04:30:12 -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 15166 invoked from network); 29 Dec 2002 04:30:10 -0000 Received: from unknown (HELO grebe.mail.pas.earthlink.net) (207.217.120.46) by 209.249.29.67 with SMTP; 29 Dec 2002 04:30:10 -0000 Received: from ilmasc01-64.midwest.net ([209.248.16.74] helo=there) by grebe.mail.pas.earthlink.net with smtp (Exim 3.33 #1) id 18SV5J-00033T-00; Sat, 28 Dec 2002 20:29:57 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Andy Walker To: Chris Lattner Subject: Re: An unusual Performance approach using Synthetic registers Date: Sun, 29 Dec 2002 00:35:00 -0000 Cc: gcc@gcc.gnu.org References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: X-SW-Source: 2002-12/txt/msg01520.txt.bz2 Thank you for your kind comments. Also, thank you very much for the reference to the Lal George paper. On Friday 27 December 2002 03:03 am, Chris Lattner wrote: > You may win a suprising amount strictly because of the register > renaming hardware found on modern x86 processors, which would eliminate > the L1 reference. I had not considered this. > On the other hand, I think this approach is not the right one to take if > improving optimizer effectiveness is the goal. My intuitin says this can be a fertile area for investigation, for these reasons: Algorithms for register use optimization are very good. My experience with numerical analysis and evaluation of algorithms, in graduate school, leads me to believe that color-graphing leads to a result that is either optimal or near-optimal. Algorithms for memory use optimization are not nearly so well developed. In one sense, this approach co-opts the optimization algorithms for registers and uses them on small amounts of memory. Color-graphing works better, the more registers there are available for use. Six registers is sub-optimal. Sixteen registers is a good start. Thirty-two plus five gives thirty-seven, enough for the algorithm to excel. > You will probably find that the number of "virtual" registers varies > widely across different incarnations of the architecture, implying that > the -march options should change the number of virtual registers. Maybe > keeping this in mind when you design the code will help down the line. :) I expect the benefit of Synthetic registers to vary with the complexity of a function. For itty-bitty subroutines, they will be a detriment, not a benefit. For longer, complicated, routines, there will be more benefit. I do not hold out my coding skills as an example of the best, but my keyboard does not really get warmed up until after I have added a couple of hundred lines to a routine. On machines like the intel 80386 that do not use cache, I expect Synthetic registers to have very limited benefits. > This will certainly be an interesting project, please keep the list > informed with what you find. :) Certainly. > -Chris