This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dead-code elimination can't remove string copy insns?


Diego Novillo <dnovillo@redhat.com> writes:

> On Tue, 2003-05-13 at 12:17, Zack Weinberg wrote:
>> Michael Matz <matz@suse.de> writes:
>> 
>> >> 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.
>> 
>> Do you have a sense for how hard this would be to implement?  Is it
>> something that's done on tree-ssa, so there's no point adding it in
>> mainline?  Will Naveen's stack-slot allocator help?
>> 
> If you show me the original source code I could tell you.  Once things
> are in RTL form, it's difficult for me to trace them back into trees. 
> There's also the situation in which we have dead code at the RTL level
> that it's impossible to detect at the tree level (e.g. address
> arithmetic for array references).

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.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]