This is the mail archive of the gcc-patches@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: [PATCH] C++ space optimization: de-cloning con/de/structors,take III


On Thu, 15 Aug 2002 16:27:21 -0700, Stuart Hastings <stuart@apple.com> wrote:

> I've removed the additional copy-constructor calls, as Jason
> requested.
>
> I spent a fair amount of effort trying to get the same result by
> setting current_function_is_thunk.  Alas, I could not discover a tree
> that would provoke the invisible reference logic, and still be
> acceptable to the usual C++ argument processing (when a
> copy-constructor was involved).  It's also not clear to me that the
> invisible reference logic will work transitively.  Perhaps
> build_function_call is not the tool I should be using here (?).
> Jason, if you have suggestions, I'd be happy to share the details with
> you off-list.

You probably want to use convert_for_arg_passing to build the reference.
And just build_call, rather than build_function_call; at this point you
don't need all the logic for converting the args appropriately.

> Per request, I've made these unified con/de/structors private to each
> translation unit (TREE_PUBLIC and DECL_EXTERNAL cleared).  This should
> effectively hide these from the ABI, with the unfortunate side-effect
> of rendering them un-coalescable.

It should be possible to have them as private symbols in a COMDAT section,
which would mean they would be coalesced but not available for reference
from object files that don't also define them.  Unless that would cause
problems for objects that called one of the discarded definitions?

Jason


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