This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/44563] GCC uses a lot of RAM when compiling a large numbers of functions
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2010 10:44:47 -0000
- Subject: [Bug tree-optimization/44563] GCC uses a lot of RAM when compiling a large numbers of functions
- References: <bug-44563-19336@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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