From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19262 invoked by alias); 13 May 2003 17:38:58 -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 19165 invoked from network); 13 May 2003 17:38:56 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 13 May 2003 17:38:56 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h4DHcsH13548; Tue, 13 May 2003 13:38:54 -0400 Received: from speedy.slc.redhat.com (vpn50-15.rdu.redhat.com [172.16.50.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h4DHcqI32159; Tue, 13 May 2003 13:38:52 -0400 Received: from redhat.com (law@localhost) by speedy.slc.redhat.com (8.12.8/8.12.8/Submit) with ESMTP id h4DHclpA012395; Tue, 13 May 2003 11:38:48 -0600 Message-Id: <200305131738.h4DHclpA012395@speedy.slc.redhat.com> X-Authentication-Warning: speedy.slc.redhat.com: law owned process doing -bs To: Diego Novillo cc: Zack Weinberg , Michael Matz , "gcc@gcc.gnu.org" Reply-To: law@redhat.com Subject: Re: Dead-code elimination can't remove string copy insns? In-Reply-To: Your message of "Tue, 13 May 2003 13:07:22 EDT." <20030513170722.GA7112@tornado.toronto.redhat.com> From: law@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 13 May 2003 17:38:00 -0000 X-SW-Source: 2003-05/txt/msg01336.txt.bz2 In message <20030513170722.GA7112@tornado.toronto.redhat.com>, Diego Novillo wr ites: >On Tue, May 13, 2003 at 09:40:33AM -0700, Zack Weinberg wrote: > >> gcc.dg/const-elim-1.c. On an x86, compile it with -march=i386 -O2; >> rs6000-ibm-aix5 and arm-elf also show the problem. >> >Yup, tree-ssa handles it. The original program in GIMPLE form is >on the left. The optimized version is on the right (we still >don't linearize GOTO_EXPRs). Does this look better? :-) test1 () { int retval.6; int T.1; char[37] * T.2; char * T.3; const char * T.4; struct S ; struct S * T.5; { int ; :; }; return; } ;; Function test2 (test2) test2 () { int retval.11; char[40] * T.7; char * T.8; int T.9; struct S * S.10; const char * str; struct S S; const complex double cplx; { int ; :; }; return; } ;; Function returns_23 (returns_23) returns_23 () { return 23; } Note the GOTOs are gone :-) The problem was the code didn't match the toplevel comments in regards to when the pass should be repeated. Basically we want to repeat if we eliminated a control structure as that can in turn expose more GOTOs that we know how to eliminate. Testing of the fix is in progress. jeff