This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/1687: Extreme compile time regression from 2.95.2
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- Cc: gcc-gnats at gcc dot gnu dot org, kelley dot cook at home dot com, gcc-bugs at gcc dot gnu dot org,pbienst at gcc dot gnu dot org, Zack Weinberg <zack at codesourcery dot com>
- Date: Sun, 10 Nov 2002 14:14:13 -0800
- Subject: Re: c++/1687: Extreme compile time regression from 2.95.2
- References: <Pine.LNX.4.44.0211101535500.21272-100000@gandalf.ticam.utexas.edu>
On Sun, Nov 10, 2002 at 03:51:12PM -0600, Wolfgang Bangerth wrote:
>
> Zack,
> you had a patch for this problem, as mentioned in the audit. Do you know
> whether it was applied? I cannot find it in the ChangeLogs.
Yes, the patch was applied. It's in cp/ChangeLog:
2001-04-24 Zack Weinberg <zackw@stanford.edu>
* cp/optimize.c: Include hashtab.h.
(struct inline_data): Add tree_pruner.
(expand_call_inline, expand_calls_inline): Use it when calling
walk_tree.
(optimize_function): Initialize and free tree_pruner.
This code is now in tree-inline.c, by the way
> However, at -O3 it still takes forever, now with both C and C++, which
> seems a further regression (since previously this held only for C++). I
> don't trust this for various reasons, so maybe someone can confirm this
> with -O3?
C being slow is a consequence of its using the tree-based inliner
(previously only C++ did). I don't know why -O3 would cause further
trouble. You could build cc1plus profiled (make clean in both
libiberty and gcc, make all in libiberty with CFLAGS="-g -O2 -profile",
make cc1plus in gcc with CFLAGS="-g -O2 -profile"), run it on the test
case, and take a look at the gprof output.
zw