Bug 52361 - gcc.dg/pr48141.c times out with checking enabled
Summary: gcc.dg/pr48141.c times out with checking enabled
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: compile-time-hog
Depends on:
Blocks:
 
Reported: 2012-02-23 17:57 UTC by Rainer Orth
Modified: 2015-12-07 08:52 UTC (History)
2 users (show)

See Also:
Host: sparc-sun-solaris2.[89]
Target: sparc-sun-solaris2.[89]
Build: sparc-sun-solaris2.[89]
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Orth 2012-02-23 17:57:46 UTC
I often see the gcc.dg/pr48141.c test time out on an 1.2 GHz UltraSPARC-T2:
on a completely unloaded machine, I find:

real     1:36.81
user     1:34.87
sys         0.48

It's not much better on an 1.35 GHz UltraSPARC-IV:

real          55.51
user          52.20
sys            0.30

while on a 2.6 GHz Opteron 8128, I get

real          17.39
user          13.45
sys            0.35

instead.

With -ftime-report, I find:


Execution times (seconds)
 phase setup             :   0.03 ( 0%) usr   0.01 ( 0%) sys   0.03 ( 0%) wall     532 kB ( 1%) ggc
 phase parsing           :   6.38 ( 6%) usr   1.92 (68%) sys   8.31 ( 8%) wall    5212 kB ( 7%) ggc
 phase cgraph            :  94.53 (94%) usr   0.89 (32%) sys  95.42 (92%) wall   73673 kB (93%) ggc
 phase generate          :  94.53 (94%) usr   0.89 (32%) sys  95.42 (92%) wall   73673 kB (93%) ggc
 garbage collection      :   2.10 ( 2%) usr   0.13 ( 5%) sys   2.22 ( 2%) wall       0 kB ( 0%) ggc
 callgraph construction  :   0.22 ( 0%) usr   0.00 ( 0%) sys   0.23 ( 0%) wall       0 kB ( 0%) ggc
 callgraph optimization  :   0.03 ( 0%) usr   0.00 ( 0%) sys   0.05 ( 0%) wall       0 kB ( 0%) ggc
 ipa pure const          :   0.25 ( 0%) usr   0.00 ( 0%) sys   0.25 ( 0%) wall       0 kB ( 0%) ggc
 cfg construction        :   0.04 ( 0%) usr   0.00 ( 0%) sys   0.04 ( 0%) wall       0 kB ( 0%) ggc
 cfg cleanup             :   0.02 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall       0 kB ( 0%) ggc
 CFG verifier            :   2.23 ( 2%) usr   0.00 ( 0%) sys   2.21 ( 2%) wall       0 kB ( 0%) ggc
 trivially dead code     :   0.85 ( 1%) usr   0.00 ( 0%) sys   0.86 ( 1%) wall       0 kB ( 0%) ggc
 df scan insns           :   0.29 ( 0%) usr   0.00 ( 0%) sys   0.30 ( 0%) wall       0 kB ( 0%) ggc
 df multiple defs        :   0.06 ( 0%) usr   0.00 ( 0%) sys   0.06 ( 0%) wall       0 kB ( 0%) ggc
 df live regs            :   0.78 ( 1%) usr   0.00 ( 0%) sys   0.78 ( 1%) wall       0 kB ( 0%) ggc
 df live&initialized regs:   0.14 ( 0%) usr   0.00 ( 0%) sys   0.12 ( 0%) wall       0 kB ( 0%) ggc
 df reg dead/unused notes:   0.53 ( 1%) usr   0.00 ( 0%) sys   0.57 ( 1%) wall       0 kB ( 0%) ggc
 register information    :   0.07 ( 0%) usr   0.00 ( 0%) sys   0.07 ( 0%) wall       0 kB ( 0%) ggc
 alias analysis          :   0.64 ( 1%) usr   0.00 ( 0%) sys   0.62 ( 1%) wall       1 kB ( 0%) ggc
 alias stmt walking      :   2.29 ( 2%) usr   0.21 ( 7%) sys   2.57 ( 2%) wall   10312 kB (13%) ggc
 register scan           :   0.09 ( 0%) usr   0.00 ( 0%) sys   0.09 ( 0%) wall       0 kB ( 0%) ggc
 rebuild jump labels     :   0.21 ( 0%) usr   0.00 ( 0%) sys   0.20 ( 0%) wall       0 kB ( 0%) ggc
 preprocessing           :   1.67 ( 2%) usr   0.49 (17%) sys   2.11 ( 2%) wall       1 kB ( 0%) ggc
 lexical analysis        :   2.05 ( 2%) usr   0.90 (32%) sys   3.11 ( 3%) wall       0 kB ( 0%) ggc
 parser function body    :   2.52 ( 2%) usr   0.53 (19%) sys   2.94 ( 3%) wall    5157 kB ( 6%) ggc
 inline heuristics       :   0.80 ( 1%) usr   0.00 ( 0%) sys   0.80 ( 1%) wall       1 kB ( 0%) ggc
 tree gimplify           :   0.54 ( 1%) usr   0.01 ( 0%) sys   0.55 ( 1%) wall    6875 kB ( 9%) ggc
 tree eh                 :   0.05 ( 0%) usr   0.00 ( 0%) sys   0.05 ( 0%) wall       0 kB ( 0%) ggc
 tree CFG construction   :   0.04 ( 0%) usr   0.00 ( 0%) sys   0.04 ( 0%) wall       0 kB ( 0%) ggc
 tree copy propagation   :   1.04 ( 1%) usr   0.00 ( 0%) sys   1.06 ( 1%) wall       0 kB ( 0%) ggc
 tree find ref. vars     :   0.08 ( 0%) usr   0.00 ( 0%) sys   0.08 ( 0%) wall       0 kB ( 0%) ggc
 tree PTA                :   1.26 ( 1%) usr   0.00 ( 0%) sys   1.26 ( 1%) wall       0 kB ( 0%) ggc
 tree SSA rewrite        :   0.22 ( 0%) usr   0.00 ( 0%) sys   0.21 ( 0%) wall    6179 kB ( 8%) ggc
 tree SSA other          :   0.22 ( 0%) usr   0.08 ( 3%) sys   0.46 ( 0%) wall       0 kB ( 0%) ggc
 tree SSA incremental    :   0.17 ( 0%) usr   0.00 ( 0%) sys   0.17 ( 0%) wall       0 kB ( 0%) ggc
 tree operand scan       :   0.42 ( 0%) usr   0.13 ( 5%) sys   0.39 ( 0%) wall    3013 kB ( 4%) ggc
 dominator optimization  :   0.15 ( 0%) usr   0.00 ( 0%) sys   0.16 ( 0%) wall       0 kB ( 0%) ggc
 tree CCP                :   0.74 ( 1%) usr   0.00 ( 0%) sys   0.74 ( 1%) wall       0 kB ( 0%) ggc
 tree reassociation      :   0.12 ( 0%) usr   0.00 ( 0%) sys   0.12 ( 0%) wall       0 kB ( 0%) ggc
 tree FRE                :   3.25 ( 3%) usr   0.23 ( 8%) sys   3.42 ( 3%) wall   10314 kB (13%) ggc
 tree linearize phis     :   0.04 ( 0%) usr   0.00 ( 0%) sys   0.03 ( 0%) wall       0 kB ( 0%) ggc
 tree forward propagate  :   0.24 ( 0%) usr   0.00 ( 0%) sys   0.23 ( 0%) wall       0 kB ( 0%) ggc
 tree conservative DCE   :   0.33 ( 0%) usr   0.00 ( 0%) sys   0.33 ( 0%) wall       0 kB ( 0%) ggc
 tree aggressive DCE     :   0.22 ( 0%) usr   0.00 ( 0%) sys   0.22 ( 0%) wall       0 kB ( 0%) ggc
 tree DSE                :   0.06 ( 0%) usr   0.00 ( 0%) sys   0.06 ( 0%) wall       0 kB ( 0%) ggc
 tree rename SSA copies  :   0.25 ( 0%) usr   0.00 ( 0%) sys   0.25 ( 0%) wall       0 kB ( 0%) ggc
 tree SSA verifier       :  19.82 (20%) usr   0.00 ( 0%) sys  19.92 (19%) wall       0 kB ( 0%) ggc
 tree STMT verifier      :  23.03 (23%) usr   0.01 ( 0%) sys  22.98 (22%) wall       0 kB ( 0%) ggc
 callgraph verifier      :   0.52 ( 1%) usr   0.00 ( 0%) sys   0.48 ( 0%) wall       0 kB ( 0%) ggc
 out of ssa              :   0.30 ( 0%) usr   0.00 ( 0%) sys   0.30 ( 0%) wall       0 kB ( 0%) ggc
 expand                  :   0.88 ( 1%) usr   0.00 ( 0%) sys   0.88 ( 1%) wall    9454 kB (12%) ggc
 post expand cleanups    :   0.03 ( 0%) usr   0.00 ( 0%) sys   0.03 ( 0%) wall       0 kB ( 0%) ggc
 forward prop            :   0.40 ( 0%) usr   0.02 ( 1%) sys   0.40 ( 0%) wall       0 kB ( 0%) ggc
 CSE                     :   0.58 ( 1%) usr   0.00 ( 0%) sys   0.59 ( 1%) wall       0 kB ( 0%) ggc
 dead code elimination   :   0.22 ( 0%) usr   0.00 ( 0%) sys   0.22 ( 0%) wall       0 kB ( 0%) ggc
 dead store elim1        :   2.23 ( 2%) usr   0.01 ( 0%) sys   2.24 ( 2%) wall    1718 kB ( 2%) ggc
 dead store elim2        :   1.79 ( 2%) usr   0.00 ( 0%) sys   1.79 ( 2%) wall    3437 kB ( 4%) ggc
 branch prediction       :   0.04 ( 0%) usr   0.00 ( 0%) sys   0.04 ( 0%) wall       0 kB ( 0%) ggc
 combiner                :   0.42 ( 0%) usr   0.00 ( 0%) sys   0.41 ( 0%) wall       0 kB ( 0%) ggc
 integrated RA           :   4.50 ( 4%) usr   0.00 ( 0%) sys   4.51 ( 4%) wall    3450 kB ( 4%) ggc
 reload                  :   7.73 ( 8%) usr   0.03 ( 1%) sys   7.75 ( 7%) wall   12031 kB (15%) ggc
 reload CSE regs         :   2.07 ( 2%) usr   0.00 ( 0%) sys   2.07 ( 2%) wall    3437 kB ( 4%) ggc
 thread pro- & epilogue  :   0.05 ( 0%) usr   0.00 ( 0%) sys   0.05 ( 0%) wall       0 kB ( 0%) ggc
 hard reg cprop          :   1.00 ( 1%) usr   0.00 ( 0%) sys   1.00 ( 1%) wall       0 kB ( 0%) ggc
 delay branch sched      :   0.19 ( 0%) usr   0.00 ( 0%) sys   0.19 ( 0%) wall       0 kB ( 0%) ggc
 final                   :   1.42 ( 1%) usr   0.01 ( 0%) sys   1.42 ( 1%) wall       0 kB ( 0%) ggc
 rest of compilation     :   1.92 ( 2%) usr   0.02 ( 1%) sys   1.96 ( 2%) wall    3438 kB ( 4%) ggc
 remove unused locals    :   0.22 ( 0%) usr   0.00 ( 0%) sys   0.23 ( 0%) wall       0 kB ( 0%) ggc
 address taken           :   0.19 ( 0%) usr   0.00 ( 0%) sys   0.20 ( 0%) wall       0 kB ( 0%) ggc
 unaccounted todo        :   0.05 ( 0%) usr   0.00 ( 0%) sys   0.05 ( 0%) wall       0 kB ( 0%) ggc
 verify RTL sharing      :   3.99 ( 4%) usr   0.00 ( 0%) sys   3.98 ( 4%) wall       0 kB ( 0%) ggc
 TOTAL                 : 100.94             2.82           103.76              79427 kB
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --enable-checking=release to disable checks.

  Rainer
Comment 1 Andrew Pinski 2012-02-23 18:03:56 UTC
Over 40% of the time is spent in the checking functions:
 tree SSA verifier       :  19.82 (20%) usr   0.00 ( 0%) sys  19.92 (19%) wall 
     0 kB ( 0%) ggc
 tree STMT verifier      :  23.03 (23%) usr   0.01 ( 0%) sys  22.98 (22%) wall 
     0 kB ( 0%) ggc
Comment 2 Richard Biener 2012-02-24 09:16:43 UTC
Well, that's sort-of expected ...
Comment 3 Richard Biener 2012-02-24 10:35:32 UTC
Actually I have a simple patch that speeds things up a bit, but not significantly
so.
Comment 4 ro@CeBiTec.Uni-Bielefeld.DE 2012-02-24 10:43:02 UTC
> --- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-24 10:35:32 UTC ---
> Actually I have a simple patch that speeds things up a bit, but not
> significantly
> so.

I wonder if the testcase couldn't be reduced a bit, or instead marked
with

	dg-require-effective-target run_expensive_tests

I doubt there is much point routinely running such a compile time hog.

	Rainer
Comment 5 Richard Biener 2012-02-24 11:38:43 UTC
Author: rguenth
Date: Fri Feb 24 11:38:39 2012
New Revision: 184549

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184549
Log:
2012-02-24  Richard Guenther  <rguenther@suse.de>

	PR middle-end/52361
	* passes.c (execute_function_todo): When verifying SSA form
	verify gimple form first.
	* tree-ssa.c (verify_ssa): Do not verify gimple form here.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/passes.c
    trunk/gcc/tree-ssa.c
Comment 6 Jakub Jelinek 2012-02-24 11:45:37 UTC
Test taking 17s on x86_64 isn't that unreasonable, nothing close to being a compile time hog, if it is slow even when cross-compiling to sparc, I guess it should be investigated why so much more time is spent there.
Comment 7 Richard Biener 2012-02-24 12:48:00 UTC
Author: rguenth
Date: Fri Feb 24 12:47:56 2012
New Revision: 184552

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184552
Log:
2012-02-24  Richard Guenther  <rguenther@suse.de>

	PR middle-end/52361
	* gimple.c (walk_gimple_op): Use predicates with less redundant
	tests.
	(is_gimple_reg_type): Move inline ...
	* gimple.h (is_gimple_reg_type): ... here.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple.c
    trunk/gcc/gimple.h
Comment 8 Eric Botcazou 2015-12-07 08:52:43 UTC
Presumably (I have never seen it).