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]

[PATCH] C++ space optimization: de-cloning con/de/structors, take III


Hello,

Here's the third offering of the con/de/structor "de-cloner."

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.

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.

Bootstraps on Linux x86 and passes the C++ testsuite with no new
regressions.

stuart hastings

2002-08-15 Stuart Hastings <stuart@apple.com>

* gcc/cp/mangle.c (write_special_name_constructor,
write_special_name_destructor) Mangle unified,
"old-style" constructors and destructors.
* gcc/cp/optimize.c (maybe_thunk_body) New.
(maybe_clone_body) Call it, and one loop becomes two.
* gcc/include/demangle.h Add 'unified' constructor and destructor enums.
* gcc/libiberty/cp-demangle.c (demangle_ctor_dtor_name)
Demangle unified constructors and destructors.

Attachment: patch.decloner.5
Description: Binary data


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