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]

PATCH to enable inlining-on-trees



This patch turns on the tree-based inliner in C++ patch.  I wrote a
blurb (checked in as wwwdocs/htdocs/news/inlining.html); I'll leave it
to Gerald to link to that, if he decides that's appropriate. 

I've attached the blurb here, as well as the final trivial patch.
This patch survived a full bootstrap/make check on i686-pc-linux-gnu.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

---------------------------------------------------------------------
<html>
<head>
<title>Inlining Improvements</title>
</head>
<body>
<h1 align="center">Inlining Improvements</h1>

<p>December 5, 1999

<p>We are pleased to announce that <A
HREF="http://www.codesourcery.com">CodeSourcery, LLC</A>, as part of a
continuing contract with the Accelerated Strategic Computing
Initiative (ASCI) program at the Los Alamos National Laboratory, has
contributed a new inliner for C++.

<p>This inliner works at an earlier phase of the compiler than the
traditional GCC inliner.  As a result, memory consumption and
compile-time is dramatically reduced for programs that make heavy use
of templates, such as C++ expression-template programs. One program
that previously required 247MB of memory to compile, and about six
minutes of compile time, now takes only 157MB and about two minutes to
compile.  Although this inliner currently only works on C++ code, we
expect that it will soon be used in C, Java, and other languages as
well.

<p>In addition, the new inliner may occasionally generate somewhat
better code since more high-level information is available optimizers.
In the future, the new inliner will be used to facilitate a number of
new optimizations, like scattering and gathering of loads and stores.
In addition, further compile-time memory and speed improvements are
likely through simplifications of the code after inlining.  These
optimizations will greatly reduce the C++ "abstraction penalty" and
improve the usability of the GNU C++ compiler.

<hr>
<i>Last modified on December 5, 1999.</i>
---------------------------------------------------------------------

1999-12-05  Mark Mitchell  <mark@codesourcery.com>

	* decl.c (init_decl_processing): Set flag_inline_trees if
	!flag_no_inline.

Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.514
diff -c -p -r1.514 decl.c
*** decl.c	1999/12/05 17:58:46	1.514
--- decl.c	1999/12/05 19:56:33
*************** init_decl_processing ()
*** 5968,5977 ****
--- 5968,5980 ----
    global_namespace = current_namespace;
    current_lang_name = NULL_TREE;
  
+   /* Adjust various flags based on command-line settings.  */
    if (flag_strict_prototype == 2)
      flag_strict_prototype = pedantic;
    if (! flag_permissive && ! pedantic)
      flag_pedantic_errors = 1;
+   if (!flag_no_inline)
+     flag_inline_trees = 1;
  
    strict_prototypes_lang_c = flag_strict_prototype;
  


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