From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25023 invoked by alias); 18 Nov 2005 17:24:24 -0000 Received: (qmail 25014 invoked by uid 22791); 18 Nov 2005 17:24:21 -0000 Received: from dumbledore.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.11) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 18 Nov 2005 17:24:21 +0000 Received: (qmail 11565 invoked from network); 18 Nov 2005 17:24:19 -0000 Received: from unknown (HELO ?192.168.189.167?) (nathan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 18 Nov 2005 17:24:19 -0000 Message-ID: <437E0E45.8000702@codesourcery.com> Date: Fri, 18 Nov 2005 17:24:00 -0000 From: Nathan Sidwell User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) MIME-Version: 1.0 To: Kenneth.Zadeck@NaturalBridge.com CC: Richard Henderson , Mark Mitchell , gcc mailing list Subject: Re: Link-time optimzation References: <20051117011900.GA17847@redhat.com> <20051117155340.0B0D674646@zadeck.dynalias.net> In-Reply-To: <20051117155340.0B0D674646@zadeck.dynalias.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2005-11/txt/msg00853.txt.bz2 Kenneth Zadeck wrote: > The stack machine that we have in mind will be as stripped down as > possible. The idea is just to get the trees in and get them back out. When I first read the proposal, I too wondered if a register machine would be better here. I've come to the conclusion that it wouldn't be, and that a stack machine is a fine choice. *) Unlike JVM, we're not producing something that is supposed to be immediately executable. Making hardware stack machines go fast is very hard -- TOS acts as a huge atomic operator. *) I can well imagine more complicated gimple nodes than simple 3 address forms. A stack machine makes this kind of thing easy to extend. As Kenny says, a stack machine is an ideal way to serialize a tree. *) The stack machine decouples the getting and putting of operands from the actual operations. Although this could lead to excessive size, that does depend on the actual encoding chosen -- something that affects both stack and register machines. nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk