This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gimplify_parameters


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]