This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Dead-code elimination can't remove string copy insns?
- From: law at redhat dot com
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: Zack Weinberg <zack at codesourcery dot com>, Michael Matz <matz at suse dot de>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 13 May 2003 11:16:15 -0600
- Subject: Re: Dead-code elimination can't remove string copy insns?
- Reply-to: law at redhat dot com
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).
Err, we do zap GOTO_EXPRs to the next statement. See
remove_useless_stmts_and_vars. It's restricted in that it can't deal
with removal of a GOTO_EXPR when the label is at a different control
nesting depth, but they're at the same nesting depth in your example.
jeff