This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug c/8108] Problem in the code generator for C and the linker is extremelly slow


------- Additional Comments From manuel dot serrano at sophia dot inria dot fr  2004-03-30 07:28 -------
Subject: Re:  Problem in the code generator for C and the linker is extremelly slow

Hello Stephan,

> I have also encountered this problem and, after spending some time profiling and
> analyzing ld, have found what the problem is:
> 
> It seems that ld uses a non-optimal algorithm to merge strings. This is done, if
> I understand correctly, to be able to represent strings that are suffixes of
> other strings as pointers into the longer string. Even though some hashing is
> used in ld to reduce the search time, the employed algorithm has more or less
> quadratic runtime in the number of strings.
> 
> I assume that the placement of debug information has changed between older gcc
> versions and newer gcc versions and that now the debug information is also mergable.
> 
> This may lead to a dramatic increase in linking time when switching from older
> versions to newer (3.2.2 for me) release. I have encountered a rise from ~10
> seconds to ~1h.
> 
> Suggestion: of course this should best be fixed in ld directly, and I will talk
> to the guys there, but it would also help if gcc would receive an option that
> makes it treat debug information as non-mergable data.
I'm happy (well, not really), to see that I'm not the only one having this
problem with gcc3. I have had the feeling that my problem was interesting
exactly nobody. This is why I'm still using gcc2.95 :-(

The gcc3.2's option "-fno-merge-constants" gets rid of the problem. 
Unfortunately it has no effect with gcc3.3 (well, I have not tested recent
versions, may be this has improved now).



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8108


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