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?


Dale Johannesen <dalej@apple.com> writes:

> On Monday, May 12, 2003, at 05:26  PM, Zack Weinberg wrote:
>> Why can't anything delete these insns? I'm guessing it has something
>> to do with the BLKmode memory access, 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.
>
> Can it tell the region's address hasn't been taken and stored somewhere?

I don't know what it can or can't tell.  In the initial RTL, the
region's address was taken and passed to a subroutine call, but CSE
deletes all of that, because it's unreachable.  By the time we get to
life analysis, the insn I quoted is the last one in the function, so
even if someone had stored the address somewhere, using it would
provoke undefined behavior.

zw


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