From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26093 invoked by alias); 17 Jun 2010 10:45:20 -0000 Received: (qmail 25666 invoked by uid 48); 17 Jun 2010 10:44:47 -0000 Date: Thu, 17 Jun 2010 10:45:00 -0000 Message-ID: <20100617104447.25665.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/44563] GCC uses a lot of RAM when compiling a large numbers of functions In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-06/txt/msg01769.txt.bz2 ------- Comment #3 from rguenth at gcc dot gnu dot org 2010-06-17 10:44 ------- Growth in time and memory is linear in the number of functions for me (GCC 4.5). rguenther@murzim:/tmp> ~/bin/maxmem2.sh /usr/bin/time gcc-4.5 -S gcc_16kgen1.c -o /dev/null 14.60user 0.61system 0:15.42elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k 80inputs+0outputs (0major+129132minor)pagefaults 0swaps total: 537864 kB rguenther@murzim:/tmp> ~/bin/maxmem2.sh /usr/bin/time gcc-4.5 -S gcc_32kgen1.c -o /dev/null 29.81user 1.43system 0:31.45elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+222866minor)pagefaults 0swaps total: 905120 kB rguenther@murzim:/tmp> ~/bin/maxmem2.sh /usr/bin/time gcc-4.5 -S gcc64k3.c -o /dev/null 60.65user 2.72system 1:03.92elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+442682minor)pagefaults 0swaps total: 1766812 kB anyway - Honza, this is probably another nice target for profiling ... Good old GCC 3.3 uses less memory but takes more compile-time btw. I suppose this is another case where we build a load of INTEGER_CSTs that remain live (like in the huge array-initializer case). Which doesn't explain the compile-time issue of course. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44563