This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lto] PATCH: Add support for referencing types from function bodies
On Mon, 2006-09-04 at 10:36 -0700, Mark Mitchell wrote:
>
> I don't think we should bother with CONST_DECLs. The only purpose of
> a
> CONST_DECL is to provide a name for a value. But, we don't need that
> for optimization; all you need is to know the integral value and its
> type. Using an INTEGER_CST with the appropriate type will use less
> memory in the LTO front end.
>
> In fact, I think that GIMPLE should not use CONST_DECLs, for the same
> reason; CONST_DECLs should be replaced by their equivalent
> INTEGER_CSTs during gimplificiation.
Except for the fact in the Fortran front-end uses them for passing
constants to functions so we get:
function_call ( &const_decl);
Also the objc front-end uses them for about the same purpose, in that
you will only get an ADDR_EXPR of a CONST_DECL.
Thanks,
Andrew Pinski