public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5}
@ 2004-02-13  9:23 John at xza5 dot com
  2004-02-13  9:24 ` [Bug c++/14138] " John at xza5 dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: John at xza5 dot com @ 2004-02-13  9:23 UTC (permalink / raw)
  To: gcc-bugs

We've got some generated C++ which compiles in about 10s (on a P4 2800) at -O0
with gcc-3.2 or 3.3.2, but takes about 1000s with 3.4.0 or 3.5.0.

-ftime-report says that the parser time has gone from 8.04s (gcc-3.3.2) to
958.19s (gcc-3.4.0) 

I'll attach the .ii shortly.

-- 
           Summary: 100x -O0 C++ Compile Time Regression {3.2,3.3} ->
                    {3.4,3.5}
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: John at xza5 dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c++/14138] 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5}
  2004-02-13  9:23 [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5} John at xza5 dot com
@ 2004-02-13  9:24 ` John at xza5 dot com
  2004-02-13  9:27 ` John at xza5 dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: John at xza5 dot com @ 2004-02-13  9:24 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.2 3.3.2


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


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

* [Bug c++/14138] 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5}
  2004-02-13  9:23 [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5} John at xza5 dot com
  2004-02-13  9:24 ` [Bug c++/14138] " John at xza5 dot com
@ 2004-02-13  9:27 ` John at xza5 dot com
  2004-02-13  9:28 ` John at xza5 dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: John at xza5 dot com @ 2004-02-13  9:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From John at xza5 dot com  2004-02-13 09:27 -------
Created an attachment (id=5742)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5742&action=view)
A .ii illustrating the compile time regression


-- 


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


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

* [Bug c++/14138] 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5}
  2004-02-13  9:23 [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5} John at xza5 dot com
  2004-02-13  9:24 ` [Bug c++/14138] " John at xza5 dot com
  2004-02-13  9:27 ` John at xza5 dot com
@ 2004-02-13  9:28 ` John at xza5 dot com
  2004-02-13  9:29 ` John at xza5 dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: John at xza5 dot com @ 2004-02-13  9:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From John at xza5 dot com  2004-02-13 09:28 -------
Created an attachment (id=5743)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5743&action=view)
time report + mem report for 3.4.0


-- 


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


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

* [Bug c++/14138] 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5}
  2004-02-13  9:23 [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5} John at xza5 dot com
                   ` (2 preceding siblings ...)
  2004-02-13  9:28 ` John at xza5 dot com
@ 2004-02-13  9:29 ` John at xza5 dot com
  2004-02-13  9:30 ` John at xza5 dot com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: John at xza5 dot com @ 2004-02-13  9:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From John at xza5 dot com  2004-02-13 09:29 -------
Created an attachment (id=5744)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5744&action=view)
Time report + mem report for 3.3.2


-- 


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


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

* [Bug c++/14138] 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5}
  2004-02-13  9:23 [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5} John at xza5 dot com
                   ` (3 preceding siblings ...)
  2004-02-13  9:29 ` John at xza5 dot com
@ 2004-02-13  9:30 ` John at xza5 dot com
  2004-02-13  9:32 ` John at xza5 dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: John at xza5 dot com @ 2004-02-13  9:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From John at xza5 dot com  2004-02-13 09:30 -------
Created an attachment (id=5745)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5745&action=view)
Time report + mem report for 3.5.0


-- 


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


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

* [Bug c++/14138] 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5}
  2004-02-13  9:23 [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5} John at xza5 dot com
                   ` (4 preceding siblings ...)
  2004-02-13  9:30 ` John at xza5 dot com
@ 2004-02-13  9:32 ` John at xza5 dot com
  2004-02-13 16:05 ` [Bug c++/14138] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: John at xza5 dot com @ 2004-02-13  9:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From John at xza5 dot com  2004-02-13 09:32 -------
Created an attachment (id=5746)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5746&action=view)
A .ii.bz2 generated with 3.3.2 


-- 


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


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

* [Bug c++/14138] [3.4/3.5 Regression] 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5}
  2004-02-13  9:23 [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5} John at xza5 dot com
                   ` (5 preceding siblings ...)
  2004-02-13  9:32 ` John at xza5 dot com
@ 2004-02-13 16:05 ` pinskia at gcc dot gnu dot org
  2004-03-01  4:56 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-13 16:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-13 16:05 -------
The problem is not really in the parser (-ftime-report is wrong but that is another bug).
The real problem is in name lookup and not using the sorted fields so it is doing a linear search almost 
all the time (at least early on).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |compile-time-hog
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-13 16:05:14
               date|                            |
            Summary|100x -O0 C++ Compile Time   |[3.4/3.5 Regression] 100x -
                   |Regression {3.2,3.3} ->     |O0 C++ Compile Time
                   |{3.4,3.5}                   |Regression {3.2,3.3} ->
                   |                            |{3.4,3.5}
   Target Milestone|---                         |3.4.0


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


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

* [Bug c++/14138] [3.4/3.5 Regression] 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5}
  2004-02-13  9:23 [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5} John at xza5 dot com
                   ` (6 preceding siblings ...)
  2004-02-13 16:05 ` [Bug c++/14138] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-03-01  4:56 ` mmitchel at gcc dot gnu dot org
  2004-03-01  6:21 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-01  4:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-01 04:55 -------
Working on a fix.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/14138] [3.4/3.5 Regression] 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5}
  2004-02-13  9:23 [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5} John at xza5 dot com
                   ` (7 preceding siblings ...)
  2004-03-01  4:56 ` mmitchel at gcc dot gnu dot org
@ 2004-03-01  6:21 ` cvs-commit at gcc dot gnu dot org
  2004-03-01  6:23 ` cvs-commit at gcc dot gnu dot org
  2004-03-01  6:28 ` mmitchel at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-01  6:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-01 06:21 -------
Subject: Bug 14138

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-03-01 06:21:40

Modified files:
	gcc/cp         : ChangeLog decl.c decl2.c name-lookup.c 
	                 name-lookup.h parser.c pt.c 

Log message:
	PR c++/14138
	* name-lookup.h (push_scope): Change prototype.
	* name-lookup.c (push_scope): Do not reenter the current class
	scope.
	* decl.c (grokfndecl): Check return code from push_scope before
	calling pop_scope.
	* decl2.c (check_classfn): Likewise.
	* parser.c (cp_parser_conversion_function_id): Likewise.
	(cp_parser_init_declarator): Likewise.
	(cp_parser_direct_declarator): Likewise.
	(cp_parser_class_specifier): Likewise.
	(cp_parser_class_head): Likewise.
	(cp_parser_lookup_name): Likewise.
	(cp_parser_constructor_declarator_p): Likewise.
	* pt.c (instantiate_class_template): Likewise.
	(resolve_typename_type): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.63&r2=1.3892.2.64
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1174.2.9&r2=1.1174.2.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.695.4.3&r2=1.695.4.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.34.2.4&r2=1.34.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.15.2.2&r2=1.15.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.157.2.15&r2=1.157.2.16
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.816.2.13&r2=1.816.2.14



-- 


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


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

* [Bug c++/14138] [3.4/3.5 Regression] 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5}
  2004-02-13  9:23 [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5} John at xza5 dot com
                   ` (8 preceding siblings ...)
  2004-03-01  6:21 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-01  6:23 ` cvs-commit at gcc dot gnu dot org
  2004-03-01  6:28 ` mmitchel at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-01  6:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-01 06:23 -------
Subject: Bug 14138

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-03-01 06:23:39

Modified files:
	gcc/cp         : ChangeLog decl.c decl2.c name-lookup.c 
	                 name-lookup.h parser.c pt.c 

Log message:
	PR c++/14138
	* name-lookup.h (push_scope): Change prototype.
	* name-lookup.c (push_scope): Do not reenter the current class
	scope.
	* decl.c (grokfndecl): Check return code from push_scope before
	calling pop_scope.
	* decl2.c (check_classfn): Likewise.
	* parser.c (cp_parser_conversion_function_id): Likewise.
	(cp_parser_init_declarator): Likewise.
	(cp_parser_direct_declarator): Likewise.
	(cp_parser_class_specifier): Likewise.
	(cp_parser_class_head): Likewise.
	(cp_parser_lookup_name): Likewise.
	(cp_parser_constructor_declarator_p): Likewise.
	* pt.c (instantiate_class_template): Likewise.
	(resolve_typename_type): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3977&r2=1.3978
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1189&r2=1.1190
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&r1=1.699&r2=1.700
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&r1=1.41&r2=1.42
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.h.diff?cvsroot=gcc&r1=1.17&r2=1.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.176&r2=1.177
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.832&r2=1.833



-- 


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


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

* [Bug c++/14138] [3.4/3.5 Regression] 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5}
  2004-02-13  9:23 [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5} John at xza5 dot com
                   ` (9 preceding siblings ...)
  2004-03-01  6:23 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-01  6:28 ` mmitchel at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-01  6:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-01 06:28 -------
Fixed in GCC 3.4 and GCC 3.5.

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


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


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

end of thread, other threads:[~2004-03-01  6:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-13  9:23 [Bug c++/14138] New: 100x -O0 C++ Compile Time Regression {3.2,3.3} -> {3.4,3.5} John at xza5 dot com
2004-02-13  9:24 ` [Bug c++/14138] " John at xza5 dot com
2004-02-13  9:27 ` John at xza5 dot com
2004-02-13  9:28 ` John at xza5 dot com
2004-02-13  9:29 ` John at xza5 dot com
2004-02-13  9:30 ` John at xza5 dot com
2004-02-13  9:32 ` John at xza5 dot com
2004-02-13 16:05 ` [Bug c++/14138] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-03-01  4:56 ` mmitchel at gcc dot gnu dot org
2004-03-01  6:21 ` cvs-commit at gcc dot gnu dot org
2004-03-01  6:23 ` cvs-commit at gcc dot gnu dot org
2004-03-01  6:28 ` mmitchel 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).