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 07:59:44 -0800
- Subject: Re: gimplify_parameters
- References: <10412211516.AA29246@vlsi1.ultra.nyu.edu>
On Tue, Dec 21, 2004 at 10:16:04AM -0500, Richard Kenner wrote:
> We routinely use the size of one type to compute that of another, or to
> compute DECL_OFFSET.
This has been fixed by, in variable_size,
/* Force creation of a SAVE_EXPR. This solves (1) code duplication
problems between parent and nested functions that occasionally can't
be cleaned up because of portions of the expression escaping the
parent function via the FRAME object, and (2) tree sharing problems
between the type system and the gimple code, which can leak SSA_NAME
objects into e.g. TYPE_SIZE, which cause heartburn when emitting
debug information. */
size = build1 (SAVE_EXPR, TREE_TYPE (size), size);
Which means that any time you use TYPE_SIZE in any other computation,
you aren't creating invalid sharing issues, because SAVE_EXPR is
designed to be shared.
> And the expressions for one DECL_OFFSET are used to compute others.
I havn't observed a problem here yet, but I imagine that's because I
havn't looked. I suspect that it could be fixed by adding
rli->offset = unshare_expr (rli->offset);
at the beginning of place_field or something.
> I don't think we can outlaw all that sharing: it would be a *huge*
> amount of work.
I don't necessarily agree, but even if true I don't see that we
have any choice.
r~