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: Michael Matz <matz at suse dot de>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 13 May 2003 11:30:12 +0200 (CEST)
- Subject: Re: Dead-code elimination can't remove string copy insns?
Hi,
On Mon, 12 May 2003, Zack Weinberg wrote:
> On an x86 (i386-linux, -march=i386), I'm seeing this insn survive
> intact from initial RTL generation all the way to final, despite the
> fact that all its outputs are dead:
>
> (insn 15 13 52 0 0x4019191c (parallel [
> ...
> (set (mem/s:BLK (reg/f:SI 59) [4 S+0 S24 A128])
> (mem/s/u:BLK (reg/f:SI 60) [1 S24 A32]))
>
> Why can't anything delete these insns? I'm guessing it has something
> to do with the BLKmode memory access,
Exactly. We don't track dead stores to memory.
> but the alias information should be sufficient to see that the memory
> region being written into is on the stack, and unused past this insn,
> hence the store is dead and can be deleted.
It should, but we don't do that currently.
Ciao,
Michael.