This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gimplify_parameters
- 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, 21 Dec 2004 11:19:03 -0800
- Subject: Re: gimplify_parameters
- References: <10412211805.AA00273@vlsi1.ultra.nyu.edu>
On Tue, Dec 21, 2004 at 01:05:38PM -0500, Richard Kenner wrote:
> Then explain the failure in PR 18067.
>
> Well it doesn't fail now, so I can't look at it...
Of course you can. Revert the patch that was applied. Duh.
> The problem is that we have a variably-sized type and so have gimplified
> each of the variable parts of the type into variables. Some of those start
> out being used in the code, so they are taken into SSA form.
>
> But then they are found to be dead, so it gets left as an SSA_NAME.
I think you'll find that explanation is false.
If it were true that we were gimplifying the size to a variable,
then the type size and dimensions should be a VAR_DECL. We don't
modify VAR_DECLs in place, we substitute them in complete statements.
So how would an SSA_NAME replace a VAR_DECL in a TYPE_SIZE?
If it were true that we were gimplifying the size to a variable,
then how would the dimension wind up as
<nop_expr <type unsigned int>
<minus_expr
<mult_expr <ssa_name j 3> <ssa_name j 3>>
<integer_cst 1>>>
But you can debug this yourself to verify.
There are really only two reasonable stances on this.
(1) You are correct and sharing should be allowed, in which case the
patch for 18067 is papering over some other problem.
(2) You are wrong and sharing cannot be allowed, in which case you
are wrong about gimplification of types.
r~