This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: WITH_SIZE_EXPR
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 20 Jul 2004 11:26:07 -0700
- Subject: Re: WITH_SIZE_EXPR
- References: <10407200349.AA01593@vlsi1.ultra.nyu.edu>
On Mon, Jul 19, 2004 at 11:49:06PM -0400, Richard Kenner wrote:
> I don't see the
> difference of whether the value (whatever it represents) is stored in
> the ARRAYR_REF or WITH_SIZE_EXPR.
The fact that you've got to look in two places to decompose an array_ref
into pointer arithmetic doesn't sound like a bad idea to you?
> There are two cases. One is a size that's known to both, but not a
> compile-time constant.
...
> The other case is where the object is of variable size and unknown to
> the called, but a (small) maximum size is known.
We should be using CALL_EXPR_HAS_RETURN_SLOT_ADDR here.
Unfortunately, introducing a variable-sized temporary early is tricky to
get rid of later, and we'd like to recognize the case in which don't need
a temporary, but can have the function store to the lhs directly. We
can't know this until after the may_alias pass.
r~