This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Extremelly slow link time with GCC 3.2 and 3.3
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: Manuel Serrano <serrano at redrock dot inria dot fr>, gnu-gcc-bug at cis dot ohio-state dot edu,gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 May 2003 04:34:20 +0930
- Subject: Re: Extremelly slow link time with GCC 3.2 and 3.3
- References: <bb2ib6$l3n$1@news-sop.inria.fr><C4447E7E-911C-11D7-9A13-000393A6D2F2@physics.uc.edu>
On Wed, May 28, 2003 at 10:57:56AM -0400, Andrew Pinski wrote:
> the linker, I would say report it to the binutils guys and see what
> they say, since the linker is their problem.
Don't be so quick to pass the buck! It's a bug that a request for
a link-time optimization can't be turned off for pathalogical input.
I'd argue the bug was in gcc, since the optimization request comes
via a section flag, and there is a -f flag that ought to disable
string merging.
> On Wednesday, May 28, 2003, at 14:50 US/Eastern, Manuel Serrano wrote:
> >Now I have test GCC 3.3. The link time is, again, *40 minutes* but by
> >contrast with GCC 3.2, "-fno-merge-constants" does not help anymore!
I'm not sure now whether I posted this or not, but the following
should cure this bug for you.
* dwarf2out.c (DEBUG_STR_SECTION_FLAGS): Heed flag_merge_constants.
diff -urpN -xCVS -x'*~' -x'*.info*' -x'*.[17]' -xTAGS gcc-ppc64-33.orig/gcc/dwarf2out.c gcc-ppc64-33/gcc/dwarf2out.c
--- gcc-ppc64-33.orig/gcc/dwarf2out.c 2003-05-07 16:36:07.000000000 +0930
+++ gcc-ppc64-33/gcc/dwarf2out.c 2003-05-12 16:58:02.000000000 +0930
@@ -3780,7 +3780,9 @@ static void mark_limbo_die_list PARAMS
/* Section flags for .debug_str section. */
#ifdef HAVE_GAS_SHF_MERGE
#define DEBUG_STR_SECTION_FLAGS \
- (SECTION_DEBUG | SECTION_MERGE | SECTION_STRINGS | 1)
+ (flag_merge_constants \
+ ? SECTION_DEBUG | SECTION_MERGE | SECTION_STRINGS | 1 \
+ : SECTION_DEBUG)
#else
#define DEBUG_STR_SECTION_FLAGS SECTION_DEBUG
#endif
--
Alan Modra
IBM OzLabs - Linux Technology Centre