public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17340] New: Internal error compiling with -O3
@ 2004-09-06 23:25 mckelvey at maskull dot com
  2004-09-06 23:27 ` [Bug c++/17340] " mckelvey at maskull dot com
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: mckelvey at maskull dot com @ 2004-09-06 23:25 UTC (permalink / raw)
  To: gcc-bugs

This program compiles fine without optimization.

alpha1:PD>uname -a
Linux alpha1 2.4.9-40 #1 Mon Sep 23 08:14:02 EDT 2002 alpha unknown

alpha1:PD>g++ -v
Reading specs from /usr/local/lib/gcc/alphaev56-unknown-linux-gnu/3.5.0/specs
Configured with: ../gcc/configure --verbose --enable-languages=c++
Thread model: posix
gcc version 3.5.0 20040207 (experimental)

\x18Configured:

alpha1:PD>alias CONFIGURECVS
alias CONFIGURECVS='../gcc/configure --verbose --enable-languages=c++
--disable-nls >clog 2>&1'

Built:
alpha1:PD>alias BUILD
alias BUILD='nice gmake CFLAGS='\'''\'' BOOT_CFLAGS='\''-O'\'' LIBCFLAGS='\''-g
-O'\'' LIBCXXFLAGS='\''-g -O'\'' bootstrap >log 2>&1'

alpha1:testsuite>/usr/local/bin/g++ -c -O3 -DNDEBUG     
-D__USE_STRING_INLINES=1 -pedantic-errors -Werror -ansi -fno-common
-fstrict-aliasing -Wall -Wold-style-cast -Wsign-promo -Wpointer-arith
-Wconversion -Wundef -Wwrite-strings -Winvalid-pch -Woverloaded-virtual
-Wcast-qual -finline-limit=5000 -Wextra -MMD      -fimplicit-templates -I. -I..
--save-temps -o test025.o test025.cc
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
           Summary: Internal error compiling with -O3
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mckelvey at maskull dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: alphaev56-unknown-linux-gnu
  GCC host triplet: alphaev56-unknown-linux-gnu
GCC target triplet: alphaev56-unknown-linux-gnu


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


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

* [Bug c++/17340] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
@ 2004-09-06 23:27 ` mckelvey at maskull dot com
  2004-09-07  8:25 ` [Bug tree-optimization/17340] [3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mckelvey at maskull dot com @ 2004-09-06 23:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mckelvey at maskull dot com  2004-09-06 23:27 -------
Created an attachment (id=7057)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7057&action=view)
Preprocessed source


-- 


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


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

* [Bug tree-optimization/17340] [3.5 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
  2004-09-06 23:27 ` [Bug c++/17340] " mckelvey at maskull dot com
@ 2004-09-07  8:25 ` pinskia at gcc dot gnu dot org
  2004-09-11 17:55 ` falk at debian dot org
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-07  8:25 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |tree-optimization
           Keywords|                            |memory-hog
            Summary|Internal error compiling    |[3.5 Regression] Internal
                   |with -O3                    |error compiling with -O3
   Target Milestone|---                         |3.5.0


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


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

* [Bug tree-optimization/17340] [3.5 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
  2004-09-06 23:27 ` [Bug c++/17340] " mckelvey at maskull dot com
  2004-09-07  8:25 ` [Bug tree-optimization/17340] [3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-09-11 17:55 ` falk at debian dot org
  2004-09-14 15:14 ` [Bug tree-optimization/17340] [4.0 " James dot W dot Mckelvey at jpl dot nasa dot gov
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: falk at debian dot org @ 2004-09-11 17:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From falk at debian dot org  2004-09-11 17:55 -------
This takes 264m for me on alphaev68-linux with 3.5.0 20040815, which seems
somewhat acceptable to me given the large inlining limit. Can you still
reproduce this with a newer 3.5?


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (2 preceding siblings ...)
  2004-09-11 17:55 ` falk at debian dot org
@ 2004-09-14 15:14 ` James dot W dot Mckelvey at jpl dot nasa dot gov
  2004-10-21 14:50 ` pinskia at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: James dot W dot Mckelvey at jpl dot nasa dot gov @ 2004-09-14 15:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From James dot W dot Mckelvey at jpl dot nasa dot gov  2004-09-14 15:14 -------
I've tried an inline limit of 2000, 600, and even 100, and it fails the same way.


-- 


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (3 preceding siblings ...)
  2004-09-14 15:14 ` [Bug tree-optimization/17340] [4.0 " James dot W dot Mckelvey at jpl dot nasa dot gov
@ 2004-10-21 14:50 ` pinskia at gcc dot gnu dot org
  2004-10-21 21:04 ` rth at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-21 14:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-21 14:50 -------
On poweprc-darwin, I only get about a max of 225Megs used at -O3.

-- 


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (4 preceding siblings ...)
  2004-10-21 14:50 ` pinskia at gcc dot gnu dot org
@ 2004-10-21 21:04 ` rth at gcc dot gnu dot org
  2004-10-21 21:05 ` rth at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-10-21 21:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2004-10-21 21:04 -------
I can confirm using >1GB peak memory, and a compile time >76 minutes,
even with inline limit of 100.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-21 21:04:09
               date|                            |


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (5 preceding siblings ...)
  2004-10-21 21:04 ` rth at gcc dot gnu dot org
@ 2004-10-21 21:05 ` rth at gcc dot gnu dot org
  2004-11-15 10:25 ` steven at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-10-21 21:05 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rth at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (6 preceding siblings ...)
  2004-10-21 21:05 ` rth at gcc dot gnu dot org
@ 2004-11-15 10:25 ` steven at gcc dot gnu dot org
  2004-12-07  9:01 ` steven at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-11-15 10:25 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |18499
              nThis|                            |


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (7 preceding siblings ...)
  2004-11-15 10:25 ` steven at gcc dot gnu dot org
@ 2004-12-07  9:01 ` steven at gcc dot gnu dot org
  2004-12-07  9:27 ` steven at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-07  9:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-07 09:01 -------
This PR makes my 3GB x86-64 box go swapping. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2004-10-21 21:04:09         |2004-12-07 09:01:24
               date|                            |


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (8 preceding siblings ...)
  2004-12-07  9:01 ` steven at gcc dot gnu dot org
@ 2004-12-07  9:27 ` steven at gcc dot gnu dot org
  2004-12-07  9:29 ` steven at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-07  9:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-07 09:27 -------
This dies at "-O1 -fno-inline" when allocating the conflict graph: 
#0  xmalloc_failed (size=142104496) at xmalloc.c:118 
#1  0x00000000007c774b in xcalloc (nelem=Variable "nelem" is not available.) 
at xmalloc.c:161 
#2  0x0000000000766852 in global_alloc (file=0x0) at global.c:526 
#3  0x0000000000713123 in rest_of_compilation () at passes.c:529 
#4  0x00000000004baa8f in execute_pass_list (pass=0xa1c340) at 
tree-optimize.c:516 
#5  0x00000000004bad29 in tree_rest_of_compilation (fndecl=0x2a9def2e00) at 
tree-optimize.c:652 
#6  0x0000000000470cf2 in expand_body (fn=0x2a9def2e00) at semantics.c:2901 
#7  0x0000000000735111 in cgraph_expand_function (node=0x2aa00720e0) at 
cgraphunit.c:822 
 
It *cough* dies somewhere else at "-O2": 
#14001 0x00000000004d2ac8 in compute_avail (block=0x2aa73ccb60) at 
tree-ssa-pre.c:1866 
#14002 0x00000000004d2ac8 in compute_avail (block=0x2aa73cca80) at 
tree-ssa-pre.c:1866 
#14003 0x00000000004d2ac8 in compute_avail (block=0x2aa73cc9a0) at 
tree-ssa-pre.c:1866 
#14004 0x00000000004d2ac8 in compute_avail (block=0x2aa73cc8c0) at 
tree-ssa-pre.c:1866 
#14005 0x00000000004d2ac8 in compute_avail (block=0x2aa73cc7e0) at 
tree-ssa-pre.c:1866 
#14006 0x00000000004d2ac8 in compute_avail (block=0x2aa73cc700) at 
tree-ssa-pre.c:1866 
#14007 0x00000000004d2ac8 in compute_avail (block=0x2aa73cc620) at 
tree-ssa-pre.c:1866 
#14008 0x00000000004d2ac8 in compute_avail (block=0x2aa73cc0e0) at 
tree-ssa-pre.c:1866 
#14009 0x00000000004d2ac8 in compute_avail (block=0x2aa73cc000) at 
tree-ssa-pre.c:1866 
#14010 0x00000000004d2ac8 in compute_avail (block=0x2aa7386ee0) at 
tree-ssa-pre.c:1866 
#14011 0x00000000004d2ac8 in compute_avail (block=0x2aa7386e00) at 
tree-ssa-pre.c:1866 
#14012 0x00000000004d2ac8 in compute_avail (block=0x2aa7386d20) at 
tree-ssa-pre.c:1866 
#14013 0x00000000004d2ac8 in compute_avail (block=0x2aa7386c40) at 
tree-ssa-pre.c:1866 
#14014 0x00000000004d2ac8 in compute_avail (block=0x2aa7386b60) at 
tree-ssa-pre.c:1866 
#14015 0x00000000004d2ac8 in compute_avail (block=0x2aa7386a80) at 
tree-ssa-pre.c:1866 
#14016 0x00000000004d2ac8 in compute_avail (block=0x2aa73869a0) at 
tree-ssa-pre.c:1866 
#14017 0x00000000004d2ac8 in compute_avail (block=0x2aa73868c0) at 
tree-ssa-pre.c:1866 
#14018 0x00000000004d2ac8 in compute_avail (block=0x2aa73867e0) at 
tree-ssa-pre.c:1866 
#14019 0x00000000004d2ac8 in compute_avail (block=0x2aa7386700) at 
tree-ssa-pre.c:1866 
#14020 0x00000000004d2ac8 in compute_avail (block=0x2aa7386620) at 
tree-ssa-pre.c:1866 
#14021 0x00000000004d2ac8 in compute_avail (block=0x2aa73861c0) at 
tree-ssa-pre.c:1866 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dberlin at dberlin dot org


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (9 preceding siblings ...)
  2004-12-07  9:27 ` steven at gcc dot gnu dot org
@ 2004-12-07  9:29 ` steven at gcc dot gnu dot org
  2004-12-07  9:31 ` steven at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-07  9:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-07 09:28 -------
For the record: 
 
(gdb) p current_function_name () 
$2 = 0x1d8124a0 "int main(int, const char* const*)" 
(gdb) p n_basic_blocks 
$1 = 29662 
 

-- 


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (10 preceding siblings ...)
  2004-12-07  9:29 ` steven at gcc dot gnu dot org
@ 2004-12-07  9:31 ` steven at gcc dot gnu dot org
  2004-12-07  9:40 ` steven at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-07  9:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-07 09:31 -------
The end of the backtrace looks like this: 
 
#18159 0x00000000004d2ac8 in compute_avail (block=0x2aa7c9f0e0) at 
tree-ssa-pre.c:1866 
#18160 0x00000000004d2ac8 in compute_avail (block=0x2aa7c9de00) at 
tree-ssa-pre.c:1866 
#18161 0x00000000004d2ac8 in compute_avail (block=0x2aa7c9da80) at 
tree-ssa-pre.c:1866 
#18162 0x00000000004d30eb in execute_pre (do_fre=0 '\0') at 
tree-ssa-pre.c:2053 
#18163 0x00000000004baa8f in execute_pass_list (pass=0xa18780) at 
tree-optimize.c:516 
---Type <return> to continue, or q <return> to quit--- 
#18164 0x00000000004bab24 in execute_pass_list (pass=0xa18200) at 
tree-optimize.c:554 
#18165 0x00000000004bad29 in tree_rest_of_compilation (fndecl=0x2a9def2e00) at 
tree-optimize.c:652 
#18166 0x0000000000470cf2 in expand_body (fn=0x2a9def2e00) at semantics.c:2901 
#18167 0x0000000000735111 in cgraph_expand_function (node=0x2aa00720e0) at 
cgraphunit.c:822 
#18168 0x0000000000735b1f in cgraph_optimize () at cgraphunit.c:1689 
#18169 0x00000000004407ea in cp_finish_file () at decl2.c:3074 
#18170 0x00000000004a5dca in c_common_parse_file (set_yydebug=Variable 
"set_yydebug" is not available.) at c-opts.c:1093 
#18171 0x00000000006faa4e in toplev_main (argc=Variable "argc" is not 
available.) at toplev.c:992 
 

-- 


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (11 preceding siblings ...)
  2004-12-07  9:31 ` steven at gcc dot gnu dot org
@ 2004-12-07  9:40 ` steven at gcc dot gnu dot org
  2004-12-07  9:41 ` steven at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-07  9:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-07 09:40 -------
With "-fno-tree-pre" we still die in global.c, only somewhere else this time: 
 
#0  xmalloc_failed (size=4072) at xmalloc.c:118 
#1  0x00000000007c7777 in xmalloc (size=Variable "size" is not available.) at 
xmalloc.c:145 
#2  0x0000002a956d8ff7 in _obstack_newchunk () from /lib64/tls/libc.so.6 
#3  0x0000000000505ea6 in bitmap_elt_insert_after (head=0x7fbfffe230, 
elt=0x1b7ade30) at bitmap.c:110 
#4  0x0000000000506f2b in bitmap_and_compl (dst=0x7fbfffe230, a=Variable "a" 
is not available.) at bitmap.c:661 
#5  0x0000000000507017 in bitmap_ior_and_compl (dst=0x4803960, a=0x4803900, 
from1=Variable "from1" is not available.) at bitmap.c:1120 
#6  0x000000000076628d in make_accurate_live_analysis () at global.c:2307 
#7  0x00000000007663ed in global_alloc (file=0x0) at global.c:347 
#8  0x0000000000713123 in rest_of_compilation () at passes.c:529 
 
Not really surprising, given this: 
(gdb) p max_regno 
$6 = 65597 
 
 

-- 


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (12 preceding siblings ...)
  2004-12-07  9:40 ` steven at gcc dot gnu dot org
@ 2004-12-07  9:41 ` steven at gcc dot gnu dot org
  2004-12-07  9:47 ` steven at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-07  9:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-07 09:40 -------
Not Alpha-specific 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|alphaev56-unknown-linux-gnu |
   GCC host triplet|alphaev56-unknown-linux-gnu |
 GCC target triplet|alphaev56-unknown-linux-gnu |


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (13 preceding siblings ...)
  2004-12-07  9:41 ` steven at gcc dot gnu dot org
@ 2004-12-07  9:47 ` steven at gcc dot gnu dot org
  2004-12-08  0:09 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-07  9:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-07 09:46 -------
When we die in PRE we have a huge number of SSA names too: 
(gdb) p ssa_names->elements_used 
$8 = 159414 
 
GCC just doesn't scale to such sizes.  I wonder how the function could 
grow this large.  Even at "-O2 -fno-inline" we still ICE in global.c with 
n_basic_blocks == 37278 and max_regno == 49402. 
 
 

-- 


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (14 preceding siblings ...)
  2004-12-07  9:47 ` steven at gcc dot gnu dot org
@ 2004-12-08  0:09 ` cvs-commit at gcc dot gnu dot org
  2004-12-08  0:32 ` steven at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-08  0:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-12-08 00:09 -------
Subject: Bug 17340

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	steven@gcc.gnu.org	2004-12-08 00:09:34

Modified files:
	gcc            : ChangeLog tree-ssa-pre.c 

Log message:
	PR tree-optimization/17340
	* tree-ssa-pre.c (compute_antic): Fix comment.
	(compute_avail): Do not recurse, instead do a DFS using a stack
	and a loop.
	(execute_pre): Adjust.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6737&r2=2.6738
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-pre.c.diff?cvsroot=gcc&r1=2.58&r2=2.59



-- 


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (15 preceding siblings ...)
  2004-12-08  0:09 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-08  0:32 ` steven at gcc dot gnu dot org
  2004-12-08  0:54 ` steven at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-08  0:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-08 00:32 -------
(From update of attachment 7697)
Applied


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #7697 is|0                           |1
           obsolete|                            |


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


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

* [Bug tree-optimization/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (16 preceding siblings ...)
  2004-12-08  0:32 ` steven at gcc dot gnu dot org
@ 2004-12-08  0:54 ` steven at gcc dot gnu dot org
  2004-12-13 22:34 ` [Bug middle-end/17340] " steven at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-08  0:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-08 00:54 -------
The rest of this bug goes away when I do this: 
 
Index: global.c 
=================================================================== 
RCS file: /cvs/gcc/gcc/gcc/global.c,v 
retrieving revision 1.118 
diff -u -3 -p -r1.118 global.c 
--- global.c    25 Nov 2004 09:30:03 -0000      1.118 
+++ global.c    8 Dec 2004 00:48:59 -0000 
@@ -344,7 +344,9 @@ global_alloc (FILE *file) 
   size_t i; 
   rtx x; 
 
+#if 0 
   make_accurate_live_analysis (); 
+#endif 
 
   max_allocno = 0; 
 
Since I have no idea what this "make_accurate_live_analysis ()" tries 
to achieve, or how, I'll leave this for someone else to look at.  But my 
personal feeling is that this "feature" should be turned off at least at 
"-O1", because we see "make_accurate_live_analysis ()" show up on profiles 
way too often, and now it also blows up GCC until it runs out of memory. 
 
The motivation for "make_accurate_live_analysis ()" is here: 
http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01038.html. 
 
 
 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at redhat dot com


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


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

* [Bug middle-end/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (17 preceding siblings ...)
  2004-12-08  0:54 ` steven at gcc dot gnu dot org
@ 2004-12-13 22:34 ` steven at gcc dot gnu dot org
  2004-12-14 15:28 ` steven at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-13 22:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-13 22:34 -------
Tree part is fixed 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|tree-optimization           |middle-end


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


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

* [Bug middle-end/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (18 preceding siblings ...)
  2004-12-13 22:34 ` [Bug middle-end/17340] " steven at gcc dot gnu dot org
@ 2004-12-14 15:28 ` steven at gcc dot gnu dot org
  2004-12-14 17:49 ` steven at gcc dot gnu dot org
  2004-12-15 18:57 ` steven at gcc dot gnu dot org
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-14 15:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-14 15:28 -------
OK, so we now have three proposed strategies to solve this bug.

1) Decide on doing accurate life analysis based on some function
   of the number of basic blocks and the number of registers.
   This limits both storage and compile time problems, but for
   large functions the accurate liveness information will not be
   available, which is unfortunate because I suspect that is one
   of those places where we need to have it the most.
  
2) Compute PAVIN/PAVOUT in blocks, instead of all registers at
   once.  This has the advantage that memory consumption can be
   controlled, but the disadvantage that you have to perform
   the iterative analysis (N_regs / block_size) times.  But at
   least the results of the analysis will be available without
   regard of the function size.

3) Rethink how we compute accurate liveness information.  Right
   now we compute PAVIN/PAVOUT but I have the feeling we do not
   actually need full partial availability information.  One of
   the things we could do is consider registers not available
   when they are not live.

The attached patch is my idea for approach number 3.  The idea
is to simply prune PAVIN with global liveness information:

  PAVIN_RELEVANT(B) = intersection of PAVIN(B) and  LIVEIN(B)

The patch just finished bootstrapping and I'm going to test it
now, and see if it brings the speedup I'm looking for. 

Since there are no test cases for accurate live analysis, I
guess I'll also have to do full SPEC runs and implement a few
test cases myself to see if this new analysis actually works.


Index: global.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/global.c,v
retrieving revision 1.118
diff -u -3 -p -r1.118 global.c
--- global.c    25 Nov 2004 09:30:03 -0000      1.118
+++ global.c    14 Dec 2004 15:19:22 -0000
@@ -2303,7 +2303,10 @@ modify_bb_reg_pav (basic_block bb, basic
   bb_pavin = bb_info->pavin;
   bb_pavout = bb_info->pavout;
   if (pred->index != ENTRY_BLOCK)
-    bitmap_ior_into (bb_pavin, BB_INFO (pred)->pavout);
+    {
+      bitmap_ior_into (bb_pavin, BB_INFO (pred)->pavout);
+      bitmap_and_into (bb_pavin, bb->global_live_at_start);
+    }
   changed_p |= bitmap_ior_and_compl (bb_pavout, bb_info->avloc,
                                     bb_pavin, bb_info->killed);
   return changed_p;


-- 


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


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

* [Bug middle-end/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (19 preceding siblings ...)
  2004-12-14 15:28 ` steven at gcc dot gnu dot org
@ 2004-12-14 17:49 ` steven at gcc dot gnu dot org
  2004-12-15 18:57 ` steven at gcc dot gnu dot org
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-14 17:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-14 17:49 -------
Thread with patch and discussion starts here:
http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01041.html

-- 


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


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

* [Bug middle-end/17340] [4.0 Regression] Internal error compiling with -O3
  2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
                   ` (20 preceding siblings ...)
  2004-12-14 17:49 ` steven at gcc dot gnu dot org
@ 2004-12-15 18:57 ` steven at gcc dot gnu dot org
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-15 18:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-12-15 18:56 -------
http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01140.html 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2004-12-15 18:57 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-06 23:25 [Bug c++/17340] New: Internal error compiling with -O3 mckelvey at maskull dot com
2004-09-06 23:27 ` [Bug c++/17340] " mckelvey at maskull dot com
2004-09-07  8:25 ` [Bug tree-optimization/17340] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-09-11 17:55 ` falk at debian dot org
2004-09-14 15:14 ` [Bug tree-optimization/17340] [4.0 " James dot W dot Mckelvey at jpl dot nasa dot gov
2004-10-21 14:50 ` pinskia at gcc dot gnu dot org
2004-10-21 21:04 ` rth at gcc dot gnu dot org
2004-10-21 21:05 ` rth at gcc dot gnu dot org
2004-11-15 10:25 ` steven at gcc dot gnu dot org
2004-12-07  9:01 ` steven at gcc dot gnu dot org
2004-12-07  9:27 ` steven at gcc dot gnu dot org
2004-12-07  9:29 ` steven at gcc dot gnu dot org
2004-12-07  9:31 ` steven at gcc dot gnu dot org
2004-12-07  9:40 ` steven at gcc dot gnu dot org
2004-12-07  9:41 ` steven at gcc dot gnu dot org
2004-12-07  9:47 ` steven at gcc dot gnu dot org
2004-12-08  0:09 ` cvs-commit at gcc dot gnu dot org
2004-12-08  0:32 ` steven at gcc dot gnu dot org
2004-12-08  0:54 ` steven at gcc dot gnu dot org
2004-12-13 22:34 ` [Bug middle-end/17340] " steven at gcc dot gnu dot org
2004-12-14 15:28 ` steven at gcc dot gnu dot org
2004-12-14 17:49 ` steven at gcc dot gnu dot org
2004-12-15 18:57 ` steven 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).