From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10366 invoked by alias); 4 Feb 2004 18:39:53 -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 10357 invoked from network); 4 Feb 2004 18:39:52 -0000 Received: from unknown (HELO colossus.systems.pipex.net) (62.241.160.73) by sources.redhat.com with SMTP; 4 Feb 2004 18:39:52 -0000 Received: from nowt.org (81-178-224-194.dsl.pipex.com [81.178.224.194]) by colossus.systems.pipex.net (Postfix) with ESMTP id 4A72C1C0031F; Wed, 4 Feb 2004 18:39:50 +0000 (GMT) Received: from finch.home (finch.home [192.168.1.6]) by nowt.org (Postfix) with ESMTP id 4935FAC92; Wed, 4 Feb 2004 18:39:50 +0000 (GMT) From: Paul Brook Organization: CodeSourcery To: kenner@vlsi1.ultra.nyu.edu (Richard Kenner), matz@suse.de Subject: Re: What to remove after tree-ssa is merged? Date: Wed, 04 Feb 2004 18:39:00 -0000 User-Agent: KMail/1.5.4 Cc: gcc@gcc.gnu.org References: <10402041757.AA02044@vlsi1.ultra.nyu.edu> In-Reply-To: <10402041757.AA02044@vlsi1.ultra.nyu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200402041839.49784.paul@codesourcery.com> X-SW-Source: 2004-02/txt/msg00285.txt.bz2 On Wednesday 04 February 2004 5:57 pm, Richard Kenner wrote: > Sure, all expressions involving any P_E recursively would have to be > expanded in the frontend, including such expressions (probably by > using temporaries in order not to have to lower the whole tree). If > that's feasible I don't know. > > You won't need temporaries within statements and it can't be done at all > for the expressions within types. It seems to me that the basic problem is thet there are expressions implicit in the typing system, and two solutions to this: (a) Lower these in the frontend/gimplifier and make all the implicit expressions explicit. This is what is done for C99 VLAs. (b) Teach the optimizers about these implicit expressions. Neither of these seems particularly easy to my unexperienced eye. On mainline we effectively have a bit of both. ie. constant folding does (b) and then it gets expanded to RTL, which does (a). There doesn't seem to be any consensus on which of these is easiest/best for tree-ssa. Is there any point continuing this thread given we don't have an implementation of either, and no frontend(s) to test them with. Paul N.B. By "implicit expression" I mean an expression which depends on a variable not mentioned directly. e.g. in previously mentioned examples a COMPONENT_REF where the actual offset depends on the size of an array which depends on the value of a variable.