This is the mail archive of the
mailing list for the GCC project.
Re: More on gimplify:create_tmp_var
- 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: Sun, 6 Jun 2004 10:20:57 -0700
- Subject: Re: More on gimplify:create_tmp_var
- References: <10406060458.AA27919@vlsi1.ultra.nyu.edu>
On Sun, Jun 06, 2004 at 12:58:43AM -0400, Richard Kenner wrote:
> I have a tree which is an ARRAY_REF of a VIEW_CONVERT_EXPR of an
> INDIRECT_REF of a VAR_DECL. The INDIRECT_REF has a variable-sized type and
> so you can't make a temporary of it.
> But I think it's a serious mistake to try to split up such a reference anyway.
> Shouldn't it be the same code as in get_inner_reference where we go
> inside VIEW_CONVERT_EXPR and most NOP_EXPR and CONVERT_EXPR?
No, I don't. Why? Because get_inner_reference is not type safe.
I think you should be generating <INDIRECT_REF <NOP_EXPR <VAR>>>
instead of using VIEW_CONVERT_EXPR after the fact. Except that
as a short-term hack you'll have to use a non-aliasing type variant
of the original type for the INDIRECT_REF.