public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/17520] New: [regression] Huge compile time for C code
@ 2004-09-16 14:27 arend dot bayer at web dot de
2004-09-16 14:29 ` [Bug middle-end/17520] " arend dot bayer at web dot de
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: arend dot bayer at web dot de @ 2004-09-16 14:27 UTC (permalink / raw)
To: gcc-bugs
Compiling the attached file with GCC 4.0.0 as of 04-09-15 takes over 70
seconds, compared to 0.6 seconds with 3.4.2. It also needs over 250MB of RAM.
Appended is the output of gcc -v -ftime-report -O2 -c slow.c -save-temps.
Reading specs from /usr/local/gcc-3.5/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --disable-checking --enable-languages=c
--prefix=/usr/local/gcc-3.5
Thread model: posix
gcc version 4.0.0 20040915 (experimental)
/usr/local/gcc-3.5/libexec/gcc/i686-pc-linux-gnu/4.0.0/cc1 -E -quiet -v slow.c
-mtune=pentiumpro -ftime-report -O2 -fpch-preprocess -o slow.i
ignoring nonexistent directory
"/usr/local/gcc-3.5/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/local/gcc-3.5/include
/usr/local/gcc-3.5/lib/gcc/i686-pc-linux-gnu/4.0.0/include
/usr/include
End of search list.
Execution times (seconds)
TOTAL : 0.00 0.00 0.01
/usr/local/gcc-3.5/libexec/gcc/i686-pc-linux-gnu/4.0.0/cc1 -fpreprocessed
slow.i -quiet -dumpbase slow.c -mtune=pentiumpro -auxbase slow -O2 -version
-ftime-report -o slow.s
GNU C version 4.0.0 20040915 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 4.0.0 20040915 (experimental).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64421
Execution times (seconds)
garbage collection : 0.03 ( 0%) usr 0.00 ( 0%) sys 0.24 ( 0%) wall
life analysis : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall
tree gimplify : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall
tree CFG construction : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
dominator optimization: 0.01 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall
tree PRE : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall
tree DSE : 0.02 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
tree iv optimization : 42.78 (58%) usr 0.28 (42%) sys 47.96 (58%) wall
expand : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall
loop analysis : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall
CPROP 1 : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
CPROP 2 : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall
CSE 2 : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
branch prediction : 30.59 (42%) usr 0.39 (58%) sys 33.79 (41%) wall
local alloc : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall
peephole 2 : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall
rename registers : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall
TOTAL : 73.50 0.67 82.10
as -V -Qy -o slow.o slow.s
GNU assembler version 2.15.90.0.1.1 (i586-suse-linux) using BFD version
2.15.90.0.1.1 20040303 (SuSE Linux)
--
Summary: [regression] Huge compile time for C code
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: arend dot bayer at web dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17520
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/17520] [regression] Huge compile time for C code
2004-09-16 14:27 [Bug middle-end/17520] New: [regression] Huge compile time for C code arend dot bayer at web dot de
@ 2004-09-16 14:29 ` arend dot bayer at web dot de
2004-09-16 14:36 ` arend dot bayer at web dot de
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: arend dot bayer at web dot de @ 2004-09-16 14:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From arend dot bayer at web dot de 2004-09-16 14:29 -------
Created an attachment (id=7151)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7151&action=view)
Source file
Try gcc -v -ftime-report -O2 -c slow.c -save-temps.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17520
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/17520] [regression] Huge compile time for C code
2004-09-16 14:27 [Bug middle-end/17520] New: [regression] Huge compile time for C code arend dot bayer at web dot de
2004-09-16 14:29 ` [Bug middle-end/17520] " arend dot bayer at web dot de
@ 2004-09-16 14:36 ` arend dot bayer at web dot de
2004-09-16 18:04 ` giovannibajo at libero dot it
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: arend dot bayer at web dot de @ 2004-09-16 14:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From arend dot bayer at web dot de 2004-09-16 14:36 -------
And here is the top of a profile for this run (captured with oprofile):
21079 23.0737 cc1 follow_ssa_edge
13348 14.6111 cc1 htab_find_slot_with_hash
5522 6.0446 cc1 loop_phi_node_p
3790 4.1487 cc1 flow_bb_inside_loop_p
3499 3.8301 cc1 analyze_scalar_evolution_1
3049 3.3375 cc1 follow_ssa_edge_in_rhs
2869 3.1405 cc1 find_var_scev_info
2549 2.7902 cc1 htab_find_slot
2492 2.7278 cc1 analyze_scalar_evolution
2200 2.4082 cc1 flow_loop_nested_p
2053 2.2473 cc1 eq_scev_info
1984 2.1717 cc1 chrec_merge
1704 1.8653 cc1 hash_scev_info
1477 1.6168 cc1 backedge_phi_arg_p
1050 1.1494 cc1 make_node_stat
791 0.8659 cc1 operand_equal_p
707 0.7739 cc1 build3_stat
627 0.6863 cc1 ggc_alloc_stat
481 0.5265 cc1 add_to_evolution
431 0.4718 cc1 add_to_evolution_1
407 0.4455 cc1 chrec_type
366 0.4006 cc1 chrec_convert
307 0.3361 cc1 build_int_cst_wide
161 0.1762 cc1 tree_code_size
98 0.1073 cc1 build_int_cst
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17520
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/17520] [regression] Huge compile time for C code
2004-09-16 14:27 [Bug middle-end/17520] New: [regression] Huge compile time for C code arend dot bayer at web dot de
2004-09-16 14:29 ` [Bug middle-end/17520] " arend dot bayer at web dot de
2004-09-16 14:36 ` arend dot bayer at web dot de
@ 2004-09-16 18:04 ` giovannibajo at libero dot it
2004-09-16 18:16 ` dberlin at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: giovannibajo at libero dot it @ 2004-09-16 18:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-09-16 18:04 -------
Confirmed, this regression seems caused by scev. Sebastian, can you please have
a look?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |giovannibajo at libero dot
| |it
AssignedTo|unassigned at gcc dot gnu |spop at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Keywords| |compile-time-hog, memory-hog
Known to fail| |4.0.0
Known to work| |3.4.1
Last reconfirmed|0000-00-00 00:00:00 |2004-09-16 18:04:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17520
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/17520] [regression] Huge compile time for C code
2004-09-16 14:27 [Bug middle-end/17520] New: [regression] Huge compile time for C code arend dot bayer at web dot de
` (2 preceding siblings ...)
2004-09-16 18:04 ` giovannibajo at libero dot it
@ 2004-09-16 18:16 ` dberlin at gcc dot gnu dot org
2004-09-18 14:25 ` [Bug middle-end/17520] [4.0 regression] " pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2004-09-16 18:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dberlin at gcc dot gnu dot org 2004-09-16 18:16 -------
Sebastian's in the middle of his vacation (he'll be back in france at the end of next week).
However, the problem is most definietely in scev.
I tried to dump the details for the profile pass, and i stopped it when it had created a 1.4 gig output
dump file.
Looks like infinite recursion somewhere to me, bob.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17520
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/17520] [4.0 regression] Huge compile time for C code
2004-09-16 14:27 [Bug middle-end/17520] New: [regression] Huge compile time for C code arend dot bayer at web dot de
` (3 preceding siblings ...)
2004-09-16 18:16 ` dberlin at gcc dot gnu dot org
@ 2004-09-18 14:25 ` pinskia at gcc dot gnu dot org
2004-09-27 19:25 ` sebastian dot pop at cri dot ensmp dot fr
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-18 14:25 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[regression] Huge compile |[4.0 regression] Huge
|time for C code |compile time for C code
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17520
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/17520] [4.0 regression] Huge compile time for C code
2004-09-16 14:27 [Bug middle-end/17520] New: [regression] Huge compile time for C code arend dot bayer at web dot de
` (4 preceding siblings ...)
2004-09-18 14:25 ` [Bug middle-end/17520] [4.0 regression] " pinskia at gcc dot gnu dot org
@ 2004-09-27 19:25 ` sebastian dot pop at cri dot ensmp dot fr
2004-09-27 20:55 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sebastian dot pop at cri dot ensmp dot fr @ 2004-09-27 19:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From sebastian dot pop at cri dot ensmp dot fr 2004-09-27 19:25 -------
Subject: Re: [regression] Huge compile time for C code
I'm testing the following patch for speeding up the analyzer when there are
numerous branches. In gdb the time consumed by the analyzer dropped down by
some significant amount of time. I will post tomorow a proper patch if tests
pass.
*** tree-scalar-evolution.c.~2.7.~ Fri Sep 17 11:14:09 2004
--- tree-scalar-evolution.c Mon Sep 27 21:07:55 2004
*************** follow_ssa_edge_in_condition_phi (struct
*** 1398,1403 ****
--- 1398,1407 ----
for (i = 1; i < PHI_NUM_ARGS (condition_phi); i++)
{
+ /* Quickly give up when one of the branches is not known. */
+ if (*evolution_of_loop == chrec_dont_know)
+ return true;
+
if (!follow_ssa_edge_in_condition_phi_branch (i, loop, condition_phi,
halting_phi,
&evolution_of_branch,
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17520
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/17520] [4.0 regression] Huge compile time for C code
2004-09-16 14:27 [Bug middle-end/17520] New: [regression] Huge compile time for C code arend dot bayer at web dot de
` (5 preceding siblings ...)
2004-09-27 19:25 ` sebastian dot pop at cri dot ensmp dot fr
@ 2004-09-27 20:55 ` pinskia at gcc dot gnu dot org
2004-10-09 7:50 ` olh at suse dot de
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-27 20:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-27 20:55 -------
*** Bug 17550 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |olh at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17520
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/17520] [4.0 regression] Huge compile time for C code
2004-09-16 14:27 [Bug middle-end/17520] New: [regression] Huge compile time for C code arend dot bayer at web dot de
` (6 preceding siblings ...)
2004-09-27 20:55 ` pinskia at gcc dot gnu dot org
@ 2004-10-09 7:50 ` olh at suse dot de
2004-10-11 18:10 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: olh at suse dot de @ 2004-10-09 7:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From olh at suse dot de 2004-10-09 07:50 -------
what is the status here? this patch fixes bug 17550
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17520
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/17520] [4.0 regression] Huge compile time for C code
2004-09-16 14:27 [Bug middle-end/17520] New: [regression] Huge compile time for C code arend dot bayer at web dot de
` (7 preceding siblings ...)
2004-10-09 7:50 ` olh at suse dot de
@ 2004-10-11 18:10 ` pinskia at gcc dot gnu dot org
2004-11-10 10:13 ` steven at gcc dot gnu dot org
2004-11-11 19:37 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-11 18:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-11 18:10 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00932.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17520
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/17520] [4.0 regression] Huge compile time for C code
2004-09-16 14:27 [Bug middle-end/17520] New: [regression] Huge compile time for C code arend dot bayer at web dot de
` (8 preceding siblings ...)
2004-10-11 18:10 ` pinskia at gcc dot gnu dot org
@ 2004-11-10 10:13 ` steven at gcc dot gnu dot org
2004-11-11 19:37 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-11-10 10:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-11-10 10:13 -------
Seb, time to ping your patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17520
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/17520] [4.0 regression] Huge compile time for C code
2004-09-16 14:27 [Bug middle-end/17520] New: [regression] Huge compile time for C code arend dot bayer at web dot de
` (9 preceding siblings ...)
2004-11-10 10:13 ` steven at gcc dot gnu dot org
@ 2004-11-11 19:37 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-11 19:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-11 19:37 -------
Fixed by:
+2004-11-11 Sebastian Pop <pop@cri.ensmp.fr>
+
+ * tree-scalar-evolution.c (follow_ssa_edge_in_condition_phi):
+ Give up as soon as the evolution is known not computable.
+
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17520
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2004-11-11 19:37 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-16 14:27 [Bug middle-end/17520] New: [regression] Huge compile time for C code arend dot bayer at web dot de
2004-09-16 14:29 ` [Bug middle-end/17520] " arend dot bayer at web dot de
2004-09-16 14:36 ` arend dot bayer at web dot de
2004-09-16 18:04 ` giovannibajo at libero dot it
2004-09-16 18:16 ` dberlin at gcc dot gnu dot org
2004-09-18 14:25 ` [Bug middle-end/17520] [4.0 regression] " pinskia at gcc dot gnu dot org
2004-09-27 19:25 ` sebastian dot pop at cri dot ensmp dot fr
2004-09-27 20:55 ` pinskia at gcc dot gnu dot org
2004-10-09 7:50 ` olh at suse dot de
2004-10-11 18:10 ` pinskia at gcc dot gnu dot org
2004-11-10 10:13 ` steven at gcc dot gnu dot org
2004-11-11 19:37 ` pinskia 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).