gcc-patches@gcc.gnu.org
[Top] [All Lists]

Re: [lto] PATCH: add more CALL_EXPR interfaces

Subject: Re: [lto] PATCH: add more CALL_EXPR interfaces
From: Ian Lance Taylor
Date: 31 Jul 2006 07:54:10 -0700
Sandra Loosemore <sandra@xxxxxxxxxxxxxxxx> writes:

> I haven't yet changed the low-level representation of CALL_EXPRs to
> actually have a variable number of operands.  My plan is to continue
> to use struct tree_exp, and instead of stuffing a TREE_LIST of
> arguments in operand 1, put an INT_CST node there that holds the
> number of arguments following the fixed operands in the node.  It's a
> little icky, but the storage overhead should be negligible (since
> integer constants are shared) and it avoids having to special-case
> CALL_EXPRs every place where compound expressions are being
> manipulated.

I assume this is a temporary maneuver, and that with the new
representation the first operand will be an int, not an INT_CST node.

> *************** tree_size (tree node)
> *** 427,433 ****
>               * sizeof (tree));
>   
>       default:
> !       return tree_code_size (code);
>       }
>   }
>   
> --- 429,439 ----
>               * sizeof (tree));
>   
>       default:
> !       if (TREE_CODE_CLASS (code) == tcc_call)
> !     return (sizeof (struct tree_exp)
> !             + (TREE_OPERAND_LENGTH (node) - 1) * sizeof (char *));
> !       else
> !     return tree_code_size (code);
>       }
>   }

Why sizeof (char *)?  Why not sizeof (tree)?

I see that TREE_VEC uses sizeof (char *), but that looks weird to me
also.

Ian

<Prev in Thread] Current Thread [Next in Thread>