This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Inlining on trees
- To: gcc at gcc dot gnu dot org
- Subject: Inlining on trees
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Wed, 03 Nov 1999 15:26:32 -0800
- Organization: CodeSourcery, LLC
Combined, the patches I've submitted over the past few days have
reduced the memory usage on one representative test-case from 340MB to
247MB, or about 27%. They've also sped up the compiler by about 9% on
that test-case, presumably due to better cache performance, and a
shorter instruction stream to iterate over. There's been no adverse
performance impact on smaller test-cases, based on our measurements.
However, we're not about to rest there. Right now, when a function is
inlined, its body is copied to the caller. If that function is
inlined, the bogy is copied again; inlining n deep involves copying
the deepest function n times. In C++, this is a big deal. Along with
the code, all local VAR_DECLs are copied along too. A whopping 32% of
the 96MB used by trees on that same test-case is VAR_DECLs.
Our customer has asked us, therefore, do inlining at the tree level in
C++, and in such a way as to avoid this problem. This should reduce
memory usage considerably, as well as speed up the compiler. We
expect this work to be done in the next month to six weeks.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com