From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10503 invoked by alias); 1 Sep 2004 10:50:35 -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 10495 invoked from network); 1 Sep 2004 10:50:34 -0000 Received: from unknown (HELO smtp3.libero.it) (193.70.192.127) by sourceware.org with SMTP; 1 Sep 2004 10:50:34 -0000 Received: from localhost (172.16.1.82) by smtp3.libero.it (7.0.027-DD01) id 40D05D0F00FBBF26; Wed, 1 Sep 2004 12:50:17 +0200 Received: from bagio (151.37.78.191) by smtp3.libero.it (7.0.027-DD01) id 40D0721D03083103; Wed, 1 Sep 2004 12:50:16 +0200 Message-ID: <038401c49011$7b0efc80$bf4e2597@bagio> From: "Giovanni Bajo" To: "Joseph S. Myers" Cc: "Rakesh Kumar, Noida" , References: <33BC33A9E76474479B76AD0DE8A1697202C38D@exch-ntd.nec.noida.hcltech.com><031701c4900d$a58ccfe0$bf4e2597@bagio> Subject: Re: stack height reduction in tree-SSA Date: Wed, 01 Sep 2004 10:50:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at libero.it X-SW-Source: 2004-09/txt/msg00028.txt.bz2 Joseph S. Myers wrote: > On Wed, 1 Sep 2004, Giovanni Bajo wrote: > >> void foo(void) >> { >> int a, b; >> >> a = get(); >> use_it(&a); >> >> b = get(); >> use_it(&b); >> } >> >> could be optimized to use only one variable on the stack. I have the >> secret > > In this example, a is still live during the second calls to get() and > use_it(); the first call to use_it() could have saved a's address. Right, sorry for the bogus example. Giovanni Bajo