public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23928] New: Exceptions require an excessive amount of compile-time memory
@ 2005-09-17 15:52 rguenth at tat dot physik dot uni-tuebingen dot de
  2005-09-17 17:07 ` [Bug tree-optimization/23928] " rguenth at tat dot physik dot uni-tuebingen dot de
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: rguenth at tat dot physik dot uni-tuebingen dot de @ 2005-09-17 15:52 UTC (permalink / raw)
  To: gcc-bugs

The tramp3d-v4.cpp testcase with flatten (aka leafify) enabled requires
excessive amount of memory for the compile, if exceptions are not
disabled via -fno-exceptions.

Compiling with -O2 -Dleafify=flatten -fno-exceptions mainline needs
at max. 670MB of ram, while omitting -fno-exceptions it tops out at
2.7GB(!).
 
Testing was done on x86_64 with 8GB ram to avoid hitting swap. ggc
params are --param ggc-min-expand=100 --param ggc-min-heapsize=131072.

The tramp3d-v4.cpp testcase is available from
http://www.tat.physik.uni-tuebingen.de/~rguenth/gcc/tramp3d-v4.cpp.gz

-ftime-report from the -fexceptions run shows

Execution times (seconds)
 garbage collection    :  19.16 ( 4%) usr   1.10 (11%) sys  20.33 ( 4%) wall   
   0 kB ( 0%) ggc
...
 integration           : 188.01 (41%) usr   2.53 (26%) sys 191.29 (40%) wall 
842654 kB (24%) ggc
...
 tree CFG cleanup      :  10.57 ( 2%) usr   0.05 ( 1%) sys  10.69 ( 2%) wall  
33061 kB ( 1%) ggc
 tree VRP              :   5.18 ( 1%) usr   0.14 ( 1%) sys   5.14 ( 1%) wall  
40349 kB ( 1%) ggc
 tree copy propagation :   5.46 ( 1%) usr   0.09 ( 1%) sys   5.56 ( 1%) wall   
5073 kB ( 0%) ggc
 tree store copy prop  :   1.10 ( 0%) usr   0.02 ( 0%) sys   0.97 ( 0%) wall   
1015 kB ( 0%) ggc
 tree find ref. vars   :   3.96 ( 1%) usr   0.05 ( 1%) sys   4.06 ( 1%) wall 
150561 kB ( 4%) ggc
 tree PTA              :  17.47 ( 4%) usr   0.29 ( 3%) sys  17.45 ( 4%) wall  
59716 kB ( 2%) ggc
 tree alias analysis   :  12.44 ( 3%) usr   0.61 ( 6%) sys  12.84 ( 3%) wall  
95403 kB ( 3%) ggc
 tree PHI insertion    :   2.25 ( 0%) usr   0.02 ( 0%) sys   2.49 ( 1%) wall  
35414 kB ( 1%) ggc
 tree SSA rewrite      :  11.87 ( 3%) usr   0.04 ( 0%) sys  11.91 ( 3%) wall 
203499 kB ( 6%) ggc
 tree SSA other        :   2.02 ( 0%) usr   0.22 ( 2%) sys   2.46 ( 1%) wall   
2499 kB ( 0%) ggc
 tree SSA incremental  :  25.40 ( 6%) usr   0.18 ( 2%) sys  26.07 ( 6%) wall  
63750 kB ( 2%) ggc
 tree operand scan     :  10.79 ( 2%) usr   1.18 (12%) sys  12.01 ( 3%) wall 
116147 kB ( 3%) ggc
 dominator optimization:  11.64 ( 3%) usr   0.08 ( 1%) sys  12.08 ( 3%) wall 
168798 kB ( 5%) ggc
...
 expand                :  15.71 ( 3%) usr   0.07 ( 1%) sys  15.54 ( 3%) wall 
194871 kB ( 6%) ggc
...
 TOTAL                 : 461.33             9.78           473.07           
3503243 kB

-- 
           Summary: Exceptions require an excessive amount of compile-time
                    memory
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at tat dot physik dot uni-tuebingen dot de
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23928


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/23928] Exceptions require an excessive amount of compile-time memory
  2005-09-17 15:52 [Bug tree-optimization/23928] New: Exceptions require an excessive amount of compile-time memory rguenth at tat dot physik dot uni-tuebingen dot de
@ 2005-09-17 17:07 ` rguenth at tat dot physik dot uni-tuebingen dot de
  2005-09-17 18:01 ` rguenth at tat dot physik dot uni-tuebingen dot de
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: rguenth at tat dot physik dot uni-tuebingen dot de @ 2005-09-17 17:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de  2005-09-17 17:07 -------
ipa-eh patch from

http://gcc.gnu.org/ml/gcc-patches/2005-09/msg00881.html

(with fix) does not really help.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23928


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/23928] Exceptions require an excessive amount of compile-time memory
  2005-09-17 15:52 [Bug tree-optimization/23928] New: Exceptions require an excessive amount of compile-time memory rguenth at tat dot physik dot uni-tuebingen dot de
  2005-09-17 17:07 ` [Bug tree-optimization/23928] " rguenth at tat dot physik dot uni-tuebingen dot de
@ 2005-09-17 18:01 ` rguenth at tat dot physik dot uni-tuebingen dot de
  2005-09-17 18:43 ` rguenth at tat dot physik dot uni-tuebingen dot de
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: rguenth at tat dot physik dot uni-tuebingen dot de @ 2005-09-17 18:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de  2005-09-17 18:00 -------
eh-complexity patch from

http://gcc.gnu.org/ml/gcc-patches/2005-06/msg01052.html

slightly edited to apply (and approved by GeoffK in june) helps:

peak memory usage is down to 1.2GB.

 garbage collection    :  17.32 ( 6%) usr   0.84 (11%) sys  18.19 ( 6%) wall   
   0 kB ( 0%) ggc
 integration           :  29.85 (10%) usr   0.86 (11%) sys  30.90 (10%) wall
2695445 kB (234%) ggc
 tree PTA              :  15.98 ( 6%) usr   0.23 ( 3%) sys  15.50 ( 5%) wall  
59710 kB ( 5%) ggc
 tree alias analysis   :  11.35 ( 4%) usr   0.51 ( 7%) sys  12.34 ( 4%) wall  
95003 kB ( 8%) ggc
 tree PHI insertion    :   2.19 ( 1%) usr   0.02 ( 0%) sys   2.26 ( 1%) wall  
35414 kB ( 3%) ggc
 tree SSA rewrite      :  12.47 ( 4%) usr   0.11 ( 1%) sys  12.80 ( 4%) wall 
203797 kB (18%) ggc
 tree SSA other        :   1.81 ( 1%) usr   0.26 ( 3%) sys   2.03 ( 1%) wall   
2499 kB ( 0%) ggc
 tree SSA incremental  :  24.40 ( 8%) usr   0.10 ( 1%) sys  24.65 ( 8%) wall  
64150 kB ( 6%) ggc
 tree operand scan     :   9.95 ( 3%) usr   1.00 (13%) sys  11.09 ( 4%) wall 
116251 kB (10%) ggc
 dominator optimization:  11.43 ( 4%) usr   0.07 ( 1%) sys  11.36 ( 4%) wall 
168489 kB (15%) ggc
 TOTAL                 : 288.38             7.62           297.15           
1154283 kB


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23928


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/23928] Exceptions require an excessive amount of compile-time memory
  2005-09-17 15:52 [Bug tree-optimization/23928] New: Exceptions require an excessive amount of compile-time memory rguenth at tat dot physik dot uni-tuebingen dot de
  2005-09-17 17:07 ` [Bug tree-optimization/23928] " rguenth at tat dot physik dot uni-tuebingen dot de
  2005-09-17 18:01 ` rguenth at tat dot physik dot uni-tuebingen dot de
@ 2005-09-17 18:43 ` rguenth at tat dot physik dot uni-tuebingen dot de
  2005-09-17 20:57 ` dnovillo at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: rguenth at tat dot physik dot uni-tuebingen dot de @ 2005-09-17 18:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de  2005-09-17 18:43 -------
Extra ggc_collect after each optimize_inline_calls does not help reduce it further.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23928


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/23928] Exceptions require an excessive amount of compile-time memory
  2005-09-17 15:52 [Bug tree-optimization/23928] New: Exceptions require an excessive amount of compile-time memory rguenth at tat dot physik dot uni-tuebingen dot de
                   ` (2 preceding siblings ...)
  2005-09-17 18:43 ` rguenth at tat dot physik dot uni-tuebingen dot de
@ 2005-09-17 20:57 ` dnovillo at gcc dot gnu dot org
  2005-09-18  0:04 ` pinskia at gcc dot gnu dot org
  2005-09-18  9:15 ` rguenth at gcc dot gnu dot org
  5 siblings, 0 replies; 8+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2005-09-17 20:57 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dnovillo at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23928


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/23928] Exceptions require an excessive amount of compile-time memory
  2005-09-17 15:52 [Bug tree-optimization/23928] New: Exceptions require an excessive amount of compile-time memory rguenth at tat dot physik dot uni-tuebingen dot de
                   ` (3 preceding siblings ...)
  2005-09-17 20:57 ` dnovillo at gcc dot gnu dot org
@ 2005-09-18  0:04 ` pinskia at gcc dot gnu dot org
  2005-09-18  9:15 ` rguenth at gcc dot gnu dot org
  5 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-18  0:04 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |memory-hog


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23928


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/23928] Exceptions require an excessive amount of compile-time memory
  2005-09-17 15:52 [Bug tree-optimization/23928] New: Exceptions require an excessive amount of compile-time memory rguenth at tat dot physik dot uni-tuebingen dot de
                   ` (4 preceding siblings ...)
  2005-09-18  0:04 ` pinskia at gcc dot gnu dot org
@ 2005-09-18  9:15 ` rguenth at gcc dot gnu dot org
  5 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-09-18  9:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rguenth at gcc dot gnu dot org  2005-09-18 09:15 -------
Created an attachment (id=9757)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9757&action=view)
testcase

Testcase attached as requested.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23928


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/23928] Exceptions require an excessive amount of compile-time memory
       [not found] <bug-23928-10053@http.gcc.gnu.org/bugzilla/>
@ 2006-10-24 14:11 ` rguenth at gcc dot gnu dot org
  0 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-24 14:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2006-10-24 14:10 -------
Fixed in 4.2.  Numbers are reasonable now:

rguenther@murzim:/space/rguenther/tramp3d> /usr/bin/time ~/bin/maxmem.sh
./install/bin/g++ -O2 -S -o /dev/null tramp3d-v4.cpp -Dleafify=flatten
total: 903456 kB
159.28user 5.17system 2:44.37elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (1major+387189minor)pagefaults 0swaps

rguenther@murzim:/space/rguenther/tramp3d> /usr/bin/time ~/bin/maxmem.sh
./install/bin/g++ -O2 -S -o /dev/null tramp3d-v4.cpp -Dleafify=flatten
-fno-exceptions
total: 871928 kB
135.61user 3.35system 2:18.78elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+299059minor)pagefaults 0swaps


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23928


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-10-24 14:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-17 15:52 [Bug tree-optimization/23928] New: Exceptions require an excessive amount of compile-time memory rguenth at tat dot physik dot uni-tuebingen dot de
2005-09-17 17:07 ` [Bug tree-optimization/23928] " rguenth at tat dot physik dot uni-tuebingen dot de
2005-09-17 18:01 ` rguenth at tat dot physik dot uni-tuebingen dot de
2005-09-17 18:43 ` rguenth at tat dot physik dot uni-tuebingen dot de
2005-09-17 20:57 ` dnovillo at gcc dot gnu dot org
2005-09-18  0:04 ` pinskia at gcc dot gnu dot org
2005-09-18  9:15 ` rguenth at gcc dot gnu dot org
     [not found] <bug-23928-10053@http.gcc.gnu.org/bugzilla/>
2006-10-24 14:11 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).