c++/1687: Extreme compile time regression from 2.95.2
Zack Weinberg
zack@codesourcery.com
Sun Nov 10 14:16:00 GMT 2002
The following reply was made to PR c++/1687; it has been noted by GNATS.
From: Zack Weinberg <zack@codesourcery.com>
To: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
Cc: gcc-gnats@gcc.gnu.org, kelley.cook@home.com, gcc-bugs@gcc.gnu.org,
pbienst@gcc.gnu.org, Zack Weinberg <zack@codesourcery.com>
Subject: Re: c++/1687: Extreme compile time regression from 2.95.2
Date: Sun, 10 Nov 2002 14:14:13 -0800
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
More information about the Gcc-prs
mailing list