This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: optimizing wrapper functions
- To: Jason Merrill <jason at cygnus dot com>, egcs at cygnus dot com
- Subject: Re: optimizing wrapper functions
- From: Zack Weinberg <zack at rabi dot columbia dot edu>
- Date: Sat, 05 Dec 1998 18:39:04 -0500
On 05 Dec 1998 15:20:40 -0800, Jason Merrill wrote:
>>>>>> Zack Weinberg <zack@rabi.columbia.edu> writes:
>
> > [avoid setting up the call again for a wrapper function]
>
>I like this idea.
>
> > I guess GCC would have to recognize that the called function had an
> > identical prototype to the wrapper, and was being called with the
> > wrapper's arguments, to pull this off.
>
>Yep. And that the arguments are only used under certain conditions in the
>rest of the function. This would render the 'current_function_is_thunk'
>support redundant.
Actually, would it do the trick if the C front end could recognize this
pattern and set current_function_is_thunk? That flag's only set for
internally generated code right now and I don't know the constraints
on its use.
zw