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: Proposal: GCC core changes for different address spaces


On Sat, Apr 23, 2005 at 02:26:54PM -0400, Paul Schlie wrote:
> - sound's good, and a natural generalization of current mem ref attributes.
> 
> (However ideally, function parameter and result value references would need
>  to be similarly qualify-able in order to enable the proper attributes to
>  be associated and enforced when references to such attributed objects are
>  passed-to/returned-from function calls; as otherwise the object's storage
>  reference attribute will be lost; which could in theory could be enabled
>  by allowing the qualification an arbitrary variable, parameter, result
>  storage type reference as a natural extension; thereby allowing the
>  specification of a pointer parameter to a static const value be specified
>  as "(static const)*", as opposed to being parsed as "static (const *) by
>  default which specifies a static pointer parameter which is prohibited,
>  therefore wouldn't introduce an ambiguity if the optionally enabled.)

Function calls and their return values are also represented in the tree representation.
There the attributes are available as part of the type representation. Type
compatibility between acutual and formal parameters is also handled by GCC front/middle end using the tree representation.

The only point, where some type information about function parameters may be missing, is
the call of library functions, which are created by an RTL optimizer. The formal
parameters of a libary call are known. If a RTL expression can be used as an
acutal parameter, is checked by GCC already in some way. 

Can tell me, who you would change the RTL and give an concrete example, 
how to use your changes and what befit they have.

mfg Martin Kögler


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