This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Weird things happen to GC with checking disabled
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 28 Sep 2003 22:44:02 +0200
- Subject: [tree-ssa] Weird things happen to GC with checking disabled
Hi,
I was trying to get timings for the infamous test case for PR 8361 with
tree-ssa.
The compiler I used is:
GNU C++ version 3.5-tree-ssa 20030928 (merged 20030923) (i686-pc-linux-gnu)
compiled by GNU C version 3.5-tree-ssa 20030928 (merged 20030923).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31916
I used the following options: "-O -quiet -ftime-report -fpermissive".
The machine is an Athlon XP2000 with 256 MB RAM. It was running X, but
I wasn't working on it so the compiler should have had the machine
pretty much just to itself.
First I tried with checking enabled I get the following timings:
Execution times (seconds)
garbage collection : 11.78 (22%) usr 0.04 ( 1%) sys 11.86 (21%) wall
cfg construction : 0.35 ( 1%) usr 0.01 ( 0%) sys 0.36 ( 1%) wall
cfg cleanup : 0.71 ( 1%) usr 0.05 ( 2%) sys 0.78 ( 1%) wall
trivially dead code : 0.25 ( 0%) usr 0.00 ( 0%) sys 0.26 ( 0%) wall
life analysis : 1.26 ( 2%) usr 0.01 ( 0%) sys 1.27 ( 2%) wall
life info update : 0.53 ( 1%) usr 0.00 ( 0%) sys 0.53 ( 1%) wall
alias analysis : 0.44 ( 1%) usr 0.03 ( 1%) sys 0.47 ( 1%) wall
register scan : 0.17 ( 0%) usr 0.00 ( 0%) sys 0.17 ( 0%) wall
rebuild jump labels : 0.13 ( 0%) usr 0.00 ( 0%) sys 0.13 ( 0%) wall
preprocessing : 0.10 ( 0%) usr 0.02 ( 1%) sys 0.12 ( 0%) wall
parser : 7.00 (13%) usr 0.85 (29%) sys 8.09 (14%) wall
name lookup : 2.31 ( 4%) usr 0.61 (21%) sys 2.96 ( 5%) wall
integration : 2.93 ( 6%) usr 0.11 ( 4%) sys 3.04 ( 5%) wall
tree gimplify : 1.13 ( 2%) usr 0.02 ( 1%) sys 1.18 ( 2%) wall
tree eh : 0.21 ( 0%) usr 0.01 ( 0%) sys 0.22 ( 0%) wall
tree CFG construction : 0.29 ( 1%) usr 0.03 ( 1%) sys 0.34 ( 1%) wall
tree CFG cleanup : 0.13 ( 0%) usr 0.00 ( 0%) sys 0.13 ( 0%) wall
tree must-alias : 0.09 ( 0%) usr 0.00 ( 0%) sys 0.09 ( 0%) wall
tree PHI insertion : 0.32 ( 1%) usr 0.14 ( 5%) sys 0.46 ( 1%) wall
tree SSA rewrite : 0.95 ( 2%) usr 0.05 ( 2%) sys 1.00 ( 2%) wall
tree SSA other : 1.38 ( 3%) usr 0.14 ( 5%) sys 1.57 ( 3%) wall
dominator optimization: 2.20 ( 4%) usr 0.21 ( 7%) sys 2.44 ( 4%) wall
tree CCP : 1.21 ( 2%) usr 0.03 ( 1%) sys 1.24 ( 2%) wall
tree PRE : 0.91 ( 2%) usr 0.03 ( 1%) sys 0.95 ( 2%) wall
tree COPYPROP : 0.10 ( 0%) usr 0.00 ( 0%) sys 0.10 ( 0%) wall
tree DCE : 0.99 ( 2%) usr 0.07 ( 2%) sys 1.06 ( 2%) wall
tree SSA to normal : 1.03 ( 2%) usr 0.12 ( 4%) sys 1.15 ( 2%) wall
dominance frontiers : 0.08 ( 0%) usr 0.00 ( 0%) sys 0.08 ( 0%) wall
expand : 5.21 (10%) usr 0.12 ( 4%) sys 5.49 (10%) wall
varconst : 0.07 ( 0%) usr 0.01 ( 0%) sys 0.08 ( 0%) wall
jump : 0.17 ( 0%) usr 0.00 ( 0%) sys 0.20 ( 0%) wall
CSE : 0.93 ( 2%) usr 0.00 ( 0%) sys 0.93 ( 2%) wall
loop analysis : 0.11 ( 0%) usr 0.01 ( 0%) sys 0.13 ( 0%) wall
branch prediction : 0.45 ( 1%) usr 0.00 ( 0%) sys 0.45 ( 1%) wall
flow analysis : 0.02 ( 0%) usr 0.00 ( 0%) sys 0.02 ( 0%) wall
combiner : 1.58 ( 3%) usr 0.00 ( 0%) sys 1.60 ( 3%) wall
if-conversion : 0.30 ( 1%) usr 0.00 ( 0%) sys 0.30 ( 1%) wall
local alloc : 0.44 ( 1%) usr 0.01 ( 0%) sys 0.45 ( 1%) wall
global alloc : 1.69 ( 3%) usr 0.06 ( 2%) sys 1.80 ( 3%) wall
reload CSE regs : 0.30 ( 1%) usr 0.03 ( 1%) sys 0.33 ( 1%) wall
flow 2 : 0.22 ( 0%) usr 0.01 ( 0%) sys 0.24 ( 0%) wall
if-conversion 2 : 0.16 ( 0%) usr 0.00 ( 0%) sys 0.16 ( 0%) wall
rename registers : 0.73 ( 1%) usr 0.01 ( 0%) sys 0.75 ( 1%) wall
shorten branches : 0.23 ( 0%) usr 0.01 ( 0%) sys 0.28 ( 0%) wall
final : 0.36 ( 1%) usr 0.03 ( 1%) sys 0.40 ( 1%) wall
symout : 0.02 ( 0%) usr 0.00 ( 0%) sys 0.03 ( 0%) wall
rest of compilation : 0.71 ( 1%) usr 0.01 ( 0%) sys 0.72 ( 1%) wall
TOTAL : 52.71 2.89 57.46
With checking disabled, I get this (median of three runs, but all three
of them look like this):
Execution times (seconds)
garbage collection : 6.67 (17%) usr 0.80 (19%) sys 142.51 (60%) wall
cfg construction : 0.16 ( 0%) usr 0.01 ( 0%) sys 0.23 ( 0%) wall
cfg cleanup : 0.39 ( 1%) usr 0.10 ( 2%) sys 1.10 ( 0%) wall
trivially dead code : 0.26 ( 1%) usr 0.00 ( 0%) sys 0.26 ( 0%) wall
life analysis : 1.42 ( 4%) usr 0.01 ( 0%) sys 1.43 ( 1%) wall
life info update : 0.53 ( 1%) usr 0.00 ( 0%) sys 0.53 ( 0%) wall
alias analysis : 0.48 ( 1%) usr 0.00 ( 0%) sys 2.36 ( 1%) wall
register scan : 0.21 ( 1%) usr 0.00 ( 0%) sys 0.21 ( 0%) wall
rebuild jump labels : 0.07 ( 0%) usr 0.00 ( 0%) sys 0.07 ( 0%) wall
preprocessing : 0.19 ( 0%) usr 0.08 ( 2%) sys 0.54 ( 0%) wall
parser : 5.37 (14%) usr 0.84 (20%) sys 19.61 ( 8%) wall
name lookup : 2.48 ( 6%) usr 0.60 (14%) sys 4.59 ( 2%) wall
integration : 2.73 ( 7%) usr 0.15 ( 4%) sys 7.80 ( 3%) wall
tree gimplify : 0.86 ( 2%) usr 0.05 ( 1%) sys 4.40 ( 2%) wall
tree eh : 0.22 ( 1%) usr 0.01 ( 0%) sys 0.70 ( 0%) wall
tree CFG construction : 0.30 ( 1%) usr 0.12 ( 3%) sys 0.70 ( 0%) wall
tree CFG cleanup : 0.12 ( 0%) usr 0.00 ( 0%) sys 0.22 ( 0%) wall
tree alias analysis : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall
tree must-alias : 0.07 ( 0%) usr 0.00 ( 0%) sys 0.22 ( 0%) wall
tree PHI insertion : 0.39 ( 1%) usr 0.18 ( 4%) sys 1.53 ( 1%) wall
tree SSA rewrite : 0.72 ( 2%) usr 0.14 ( 3%) sys 4.37 ( 2%) wall
tree SSA other : 0.88 ( 2%) usr 0.18 ( 4%) sys 2.94 ( 1%) wall
dominator optimization: 1.85 ( 5%) usr 0.26 ( 6%) sys 6.30 ( 3%) wall
tree CCP : 0.85 ( 2%) usr 0.10 ( 2%) sys 1.09 ( 0%) wall
tree PRE : 0.48 ( 1%) usr 0.03 ( 1%) sys 1.91 ( 1%) wall
tree COPYPROP : 0.12 ( 0%) usr 0.00 ( 0%) sys 0.13 ( 0%) wall
tree DCE : 0.78 ( 2%) usr 0.09 ( 2%) sys 2.94 ( 1%) wall
tree SSA to normal : 1.06 ( 3%) usr 0.08 ( 2%) sys 5.20 ( 2%) wall
dominance frontiers : 0.11 ( 0%) usr 0.00 ( 0%) sys 0.15 ( 0%) wall
expand : 2.33 ( 6%) usr 0.19 ( 4%) sys 7.93 ( 3%) wall
varconst : 0.04 ( 0%) usr 0.01 ( 0%) sys 1.50 ( 1%) wall
jump : 0.14 ( 0%) usr 0.01 ( 0%) sys 0.27 ( 0%) wall
CSE : 0.57 ( 1%) usr 0.02 ( 0%) sys 0.67 ( 0%) wall
loop analysis : 0.22 ( 1%) usr 0.00 ( 0%) sys 0.26 ( 0%) wall
branch prediction : 0.31 ( 1%) usr 0.00 ( 0%) sys 0.55 ( 0%) wall
flow analysis : 0.03 ( 0%) usr 0.00 ( 0%) sys 0.07 ( 0%) wall
combiner : 1.50 ( 4%) usr 0.02 ( 0%) sys 1.84 ( 1%) wall
if-conversion : 0.18 ( 0%) usr 0.00 ( 0%) sys 0.23 ( 0%) wall
mode switching : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.02 ( 0%) wall
local alloc : 0.42 ( 1%) usr 0.01 ( 0%) sys 0.69 ( 0%) wall
global alloc : 1.48 ( 4%) usr 0.06 ( 1%) sys 1.86 ( 1%) wall
reload CSE regs : 0.34 ( 1%) usr 0.02 ( 0%) sys 0.67 ( 0%) wall
flow 2 : 0.17 ( 0%) usr 0.00 ( 0%) sys 0.25 ( 0%) wall
if-conversion 2 : 0.06 ( 0%) usr 0.00 ( 0%) sys 0.07 ( 0%) wall
rename registers : 0.49 ( 1%) usr 0.01 ( 0%) sys 0.53 ( 0%) wall
shorten branches : 0.19 ( 0%) usr 0.00 ( 0%) sys 0.83 ( 0%) wall
final : 0.35 ( 1%) usr 0.08 ( 2%) sys 2.92 ( 1%) wall
symout : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.02 ( 0%) wall
rest of compilation : 0.61 ( 2%) usr 0.01 ( 0%) sys 2.48 ( 1%) wall
TOTAL : 39.24 4.27 238.08
Not good, and completely repeatable for me (rebooted machine, ran it
from the shell in a clean session without X in the background, etc...).
I did a re-run with all tree optimizers disabled and that doesn't help
much (-fno-tree-{pre,dce,dominator-opts,must-alias,copyprop,ccp}):
garbage collection : 4.39 (13%) usr 0.58 (21%) sys 86.77 (62%) wall
...
TOTAL : 33.20 2.77 139.95
I also tried --param {ggc-min-expand,ggc-min-heapsize}=0 and it took a
good two hours to complete with checking enabled, so I decided to not
try that again with checking disabled :-/
Then I ran the gcc and g++ test suites, both without trouble and in
about the same time as usual.
Finally, I tried mainline, both with checking enabled and disabled, and
both work just fine (mainline without checking ~62s, which is slightly
slower than tree-ssa with checking. If those figures are correct... ;-)
Apparently something changes with checking disabled that causes things
to go bad, but I can't find the problem. Does anyone else see this?
Any hints on how to debug this?
Gr.
Steven
P.S.
I tried -disable-gimple, but that just ICEs when we're apparently trying
to expand a COMPOUND_STMT with expand_expr!?.