Bug 12655

Summary: [tree-ssa] Excessive memory usage---32-bit virtual memory exhausted
Product: gcc Reporter: lucier
Component: rtl-optimizationAssignee: Not yet assigned to anyone <unassigned>
Severity: normal CC: gcc-bugs
Priority: P2 Keywords: memory-hog
Version: tree-ssa   
Target Milestone: tree-ssa   
Host: sparc-sun-solaris2.8 Target: sparc-sun-solaris2.8
Build: sparc-sun-solaris2.8 Known to work:
Known to fail: Last reconfirmed: 2003-11-18 16:49:47

Description lucier 2003-10-17 03:28:25 UTC
With this compiler

banach-19% gcc -v
Reading specs from
Configured with: ../configure --enable-checking=no --enable-languages=c
Thread model: posix
gcc version 3.5-tree-ssa 20031016 (merged 20031005)

I get the following results on the file


when it exhausts the 2GB (?) virtual memory process size after about 90 minutes
(?) of cpu time.

gcc -I../include -I. -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule-insns2
-fno-trapping-math -fno-strict-aliasing -fomit-frame-pointer -fPIC -fno-common
-D___GAMBCDIR=\"/usr/local/\" -c _num.c
virtual memory exhausted: Not enough space
make[1]: *** [_num.o] Error 1
Comment 1 Steven Bosscher 2003-11-14 07:15:11 UTC
It compiles for me without running out of memory.  Brad, does it still happen 
for you? 
Comment 2 Andrew Pinski 2003-11-18 06:01:14 UTC
Any memory hog.
Brad can you try again, it might be fixed with a patch to fix PRE's memory problems.
Comment 3 Andrew Macleod 2003-11-18 15:45:11 UTC
My compile times indicate that for mainline it takes 930 seconds to compile with
Tree-ssa with -fno-tree-pre compiles it in 73 seconds.

with PRE, it compiles in 165 seconds now. 

So PRE is definately better than it was, and both are WAY better than mainline :-).

Mainline is spending over 80% of its time in regstack...

-fno-tree-pre can compile it in 107 seconds at -O3
Comment 4 Andrew Pinski 2003-11-18 16:49:47 UTC
Wow, a testcase where the tree-ssa is faster :)
Comment 5 lucier 2003-11-19 05:30:18 UTC
Subject: Re:  [tree-ssa] Excessive memory usage---32-bit virtual memory exhausted

I'm out of town, but I managed to build it and compute the current  
time.  It required about 340 MB, top, to compile:

banach-21% time ~/local/tree-ssa/bin/gcc -I../include -I. -Wall -W  
-Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-trapping-math  
-fno-strict-aliasing -fomit-frame-pointer -fPIC -fno-common  
-DHAVE_CONFIG_H -D___PRIMAL -D___LIBRARY -D___GAMBCDIR=\"/usr/local/\"  
-c _num.i -v
Reading specs from  
Configured with: ../configure --enable-languages=c  
Thread model: posix
gcc version 3.5-tree-ssa 20031118 (merged 20031111)
solaris2.8/3.5-tree-ssa/cc1 -fpreprocessed _num.i -quiet -dumpbase  
_num.i -mcpu=v7 -auxbase _num -O1 -Wall -W -Wno-unused -version  
-fno-math-errno -fschedule-insns2 -fno-trapping-math  
-fno-strict-aliasing -fomit-frame-pointer -fPIC -fno-common -o  
GNU C version 3.5-tree-ssa 20031118 (merged 20031111)  
         compiled by GNU C version 3.5-tree-ssa 20031118 (merged  
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
  /usr/ccs/bin/as -V -Qy -s -K PIC -xarch=v8 -o _num.o /tmp/ccbTc7Fr.s
/usr/ccs/bin/as: Sun WorkShop 6 99/08/18
1794.66u 117.09s 7:42.72 413.1%

This is with checking enabled, so I don't think this is an issue  

If it becomes an issue, I'll file another report ;-).


Comment 6 Andrew Pinski 2003-11-19 05:33:30 UTC
Fixed so closing.