This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada bootstrap failure due to new DCE bug
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 10 Aug 2004 13:35:37 -0400
- Subject: Re: Ada bootstrap failure due to new DCE bug
- Organization: Red Hat Canada
- References: <10408030312.AA06854@vlsi1.ultra.nyu.edu> <20040805052826.GA25250@redhat.com>
On Thu, 2004-08-05 at 01:28, Richard Henderson wrote:
> (1) The variable is pristine.
>
> (2) The variable is variably indexed, but not addressable. In this
> case it *does* need to live in memory, since there's basically
> no other way that variable indexing can be done without, um,
> interesting hardware. But the variable is not aliased in any
> way, and all references to it will be through its decl.
>
Right. ATM, we equate needs-to-live-in-memory to call-clobberedness.
However, since I introduced CALL_CLOBBERED_VARS, I *think* we don't need
DECL_NEEDS_TO_LIVE_IN_MEMORY_INTERNAL anymore. So, I suspect that your
patch to get rid of it is good. So, go ahead with it if it works.
The aliasing pass does not need to care about (2) and I don't think we
really care about needing to live in memory, just whether things are
call-clobbered (ie, only a subset of needs-to-live-in-memory).
> (3) The variable has its address taken, but the address is only used
> in controled ways, e.g. memset (&x, 0, sizeof(x)). We don't
> actually recognize or do anything with this case at present, but
> we should in the not-too-distant future, so I want you thinking
> about it from a representational standpoint.
>
Agreed. We need to handle this. Do we have a way of recognizing
standard libc-style calls? I'm thinking of scanf, memset, printf, and
their cousins in other languages.
> Are there any cases I missed?
>
Can't think of any, ATM.
Diego.