This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C++ space optimization: de-cloning con/de/structors,take II
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Stuart Hastings <stuart at apple dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 07 Aug 2002 23:01:38 -0700
- Subject: Re: [PATCH] C++ space optimization: de-cloning con/de/structors,take II
The one unresolved point has to do with DECL_NUM_STMTS(); an objection
was raised, characterizing this usage as "bogus."
I should qualify that.
I thought you were using DECL_NUM_STMTS to figure out whether the
clone was doing anything interesting. If you're just using it to
figure out how big it is, that's OK. Using "non-trivial" in the
commment here is misleading; that has a different meaning for C++
wonks than for ordinary humans.
There are still some style nits; you don't have prototypes for
maybe_alias_body and maybe_thunk_body, and we're now using ANSI/ISO C
in the C++ front end so you should rework the function declarations.
In fact, maybe_alias_body should be removed; it's always a waste of
time at this point.
And, you definitely need to be using the "current_function_is_thunk"
stuff; if I read the code correctly you'll still be creating additional
copies which is not good.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com