[C++] more useless stuff in expand_body

Mark Mitchell mark@codesourcery.com
Thu Sep 6 23:26:00 GMT 2007


Jan Hubicka wrote:

> Last remaining bit is the thunks.  I spent some time poking about it
> last week trying to add some cgraph API to register thunks instead of
> letting C++ frontend to do the job himself, but it is a bit involved.
> Would you be happy with at least intermediate solution of replacing
> expand_body hook by expand_associated_thunks hook that would be called
> from PM? That way I can proceed with passmanagerizing the remaining
> cgraph bits making LTO pass queue cleaner.

Yes, that seems OK.  I agree that, in the longer term, thunks need to
become first-class objects in the middle-end.  If it helps, G++ could
certainly generate all the thunks at the same point that it creates the
body of a function; we just need to link their emission to emission of
the associated function.  Of course, that would cause us to use more
memory, since we have to have the thunks around for all functions, even
when we don't emit them, but....

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list