Hi I'm developing a linux distribution with friends, and we decided to use gcc 4. A few days ago, KDE 3.3.92 was released. But it doesn't compile :( Especially, with the kdepim package, g++ starts eating all the memory and all the CPU on a file. I can't submit this file because it relies on a lot of headers and libs from KDE and Qt so it would be to heavy. Here is the command line : if /bin/sh ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../libkmime -I../libkpgp -I../libkdenetwork -I../libkdepim -I../libkpimidentities -I../libemailfunctions -I../libksieve -I../mimelib -I../certmanager/lib -I.. -I../libkdepim -I/usr/lib/qt3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -D_FILE_OFFSET_BITS=64 -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT globalsettings.lo -MD -MP -MF ".deps/globalsettings.Tpo" -c -o globalsettings.lo globalsettings.cpp; \ then mv -f ".deps/globalsettings.Tpo" ".deps/globalsettings.Plo"; else rm -f ".deps/globalsettings.Tpo"; exit 1; fi Configure of gcc : ../gcc-4.0-20050130/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++,java,objc --with-libffi --enable-libffi I reported the bug on bugs.kde.org too : http://bugs.kde.org/show_bug.cgi?id=99045 Thanks
Did you read <http://gcc.gnu.org/bugs.html>. We need the preprocessed source.
Created attachment 8162 [details] The prepocessed source I'm sorry, really sorry ! I generated the file, but forget to send it :/
Ok, I can confirm this with the following options on powerpc-darwin (which means it is most likely a tree optimizator problem but I could be wrong). -fno-exceptions -fno-check-new -fno-common -O2 It worked in 3.3.2 so this is a regression.
PRE is eating up a huge amount of memory.
Reverting the following patch fixes the bug: 2005-01-14 Steven Bosscher <stevenb@suse.de> * tree-ssa-dce.c (visited_control_parents): New sbitmap to replace BB_VISITED uses. (find_obviously_necessary_stmts): Don't clear BB_VISITED. (propagate_necessity): Check the bitmap instead of BB_VISITED. (tree_dce_done): Free visited_control_parents. (perform_tree_ssa_dce): Allocate and clear it. * tree-ssa-pre.c (compute_antic_aux): Make non-recursive. (compute_antic): Iterate from here using a DFS. Use an sbitmap instead of BB_VISITED.
Pinski is correct (i know because i told him that was the cause :P) It no longer converges (i suspect some strange bug in your logic). Before it converged in 2 iterations. I stopped it at 958 iterations because i was running out of memory.
I'll look into it.
Created attachment 8166 [details] Partial revision of the problematic patch I'm not sure what exactly is wrong here. I suggest we revert the parts of the patch that are unrelated to BB_VISITED for now. This is what the attached patch does. I'll test it and commit it if it passes.
Subject: Bug 19876 CVSROOT: /cvs/gcc Module name: gcc Changes by: steven@gcc.gnu.org 2005-02-11 21:52:39 Modified files: gcc : ChangeLog tree-ssa-pre.c Log message: PR tree-optimization/19876 Partially revert my change from 2005-01-14 * tree-ssa-pre.c (compute_antic_aux): Make recursive once again... (compute_antic): ...and remove the loop here. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7450&r2=2.7451 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-pre.c.diff?cvsroot=gcc&r1=2.63&r2=2.64
Should be fixed now. Bash me if it is not.