Bug 12655 - [tree-ssa] Excessive memory usage---32-bit virtual memory exhausted
Summary: [tree-ssa] Excessive memory usage---32-bit virtual memory exhausted
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: tree-ssa
: P2 normal
Target Milestone: tree-ssa
Assignee: Not yet assigned to anyone
URL:
Keywords: memory-hog
Depends on:
Blocks:
 
Reported: 2003-10-17 03:28 UTC by lucier
Modified: 2003-11-19 05:33 UTC (History)
1 user (show)

See Also:
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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lucier 2003-10-17 03:28:25 UTC
With this compiler

banach-19% gcc -v
Reading specs from
/export/mdd0/users/lucier/local/gcc-ssa/bin/../lib/gcc/sparc-sun-solaris2.8/3.5-tree-ssa/specs
Configured with: ../configure --enable-checking=no --enable-languages=c
--prefix=/home/c/lucier/local/gcc-ssa
Thread model: posix
gcc version 3.5-tree-ssa 20031016 (merged 20031005)

I get the following results on the file

http://www.math.purdue.edu/~lucier/bugzilla/1/_num.i.gz

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
-save-temps -DHAVE_CONFIG_H -D___PRIMAL -D___LIBRARY
-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
-O2.
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  
/export/mdd0/users/lucier/local/tree-ssa/bin/../lib/gcc/sparc-sun- 
solaris2.8/3.5-tree-ssa/specs
Configured with: ../configure --enable-languages=c  
--prefix=/home/c/lucier/local/tree-ssa
Thread model: posix
gcc version 3.5-tree-ssa 20031118 (merged 20031111)
   
/export/mdd0/users/lucier/local/tree-ssa/bin/../libexec/gcc/sparc-sun- 
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  
/tmp/ccbTc7Fr.s
GNU C version 3.5-tree-ssa 20031118 (merged 20031111)  
(sparc-sun-solaris2.8)
         compiled by GNU C version 3.5-tree-ssa 20031118 (merged  
20031111).
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  
anymore.

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

Brad

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