This is the mail archive of the
mailing list for the GCC project.
Re: [C++/cgraph] Middle-end thunk support
> Jan Hubicka wrote:
> > + tree vfunc_type = make_node (FUNCTION_TYPE);
> > + TREE_TYPE (vfunc_type) = integer_type_node;
> > + TYPE_ARG_TYPES (vfunc_type) = NULL_TREE;
> > + layout_type (vfunc_type);
> I like the overall direction of these patches. But, this code in
> thunk_adjust looks like it will create a new type every time. Can't we
Yes, it creates new type, I considered it harmless given that thunks are not
inlined and whole functions are short lived.
Currently vfunc_type is in C++ only datastructures, so we would have to move it
to middle end and LTO it, or just initialize lazilly static vfunc_type var
first time we output thunk? Or can I grab it somewhere conveniently from
> remember the type and use it again, or use the higher-level
> type-creation functions so that we have ashared type?
By higher-level you mean stuff like integer_type_node?
> Mark Mitchell
> (650) 331-3385 x713