This is the mail archive of the 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: [lto] PATCH: Add support for referencing types from function bodies

Andrew Pinski wrote:
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.

I think Fortran and Objective-C should change, and that they may need to change in order to work with LTO. I think that, as in C/C++, a VAR_DECL with TREE_READONLY should be used instead, and that CONST_DECLs should never be addressable.

Mark Mitchell
(650) 331-3385 x713

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