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]

Re: optimizing wrapper functions


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


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