[tree-ssa] Preliminary analysis on POOMA slow downs (was Re: [tree-ssa] Speed up constant propagation)
Diego Novillo
dnovillo@redhat.com
Tue Jun 17 18:12:00 GMT 2003
[ moved from gcc-patches@ ]
On Tue, 2003-06-17 at 07:38, Richard Guenther wrote:
> Its src/Field/tests/Cartesian.cpp which you dont have, because thats in my
> local tree ;) A preprocessed file is at
>
> http://www.tat.physik.uni-tuebingen.de/~rguenth/gcc/Cartesian.ii.gz
>
Thanks Richard. There are a few interesting things in this program.
It exposes quite clearly the performance problems with type-based
aliasing. If you compile the test with -ftree-points-to=andersen you
should see ~18% speed up in compilation time. The type-based analyzer
was creating so many alias relations that it creates a lot more work for
the SSA passes:
Type-based aliasing Points-to analysis
tree alias analysis : 26.63 (10%) usr 19.03 ( 9%) usr
tree PHI insertion : 47.80 (18%) usr 15.38 ( 7%) usr
tree SSA rewrite : 6.56 ( 2%) usr 2.15 ( 1%) usr
tree SSA other : 4.97 ( 2%) usr 4.46 ( 2%) usr
tree SSA to normal : 7.15 ( 3%) usr 3.28 ( 1%) usr
tree CCP : 10.17 ( 4%) usr 2.84 ( 1%) usr
tree COPYPROP : 3.57 ( 1%) usr 3.20 ( 1%) usr
tree DCE : 2.51 ( 1%) usr 1.22 ( 1%) usr
total SSA time : 109.36 (40%) usr 51,56 (23%) usr
total compile time : 268.80 usr 220.32 usr
I'm playing with the idea of removing the alias analysis we do by
default. Chris Lattner mentioned it at the Symposium and it's
definitely something worth trying. The fact is that currently we don't
use aliasing information for anything but removing some additional dead
code in some cases. It may have other repercussions, so I need to give
it some more thought first.
The program also exposes some other differences. Here, I'm going to
compare tree-ssa with PTA enabled vs mainline. The listing only
includes passes common with mainline where tree-ssa is noticeably
different, so the TOTAL line doesn't add up (all times are USR secs):
mainline tree-ssa % slowdown
varconst : 0.12 9.30 7650%
global CSE : 2.48 29.65 1095%
integration : 2.93 22.00 650%
global alloc : 3.40 19.31 468%
garbage collection : 1.70 7.65 350%
scheduling 2 : 1.22 3.11 155%
loop analysis : 3.04 6.41 110%
parser : 7.00 10.43 49%
name lookup : 6.28 7.52 20%
branch prediction : 4.08 2.49 -39%
jump : 3.62 1.94 -46%
reload CSE regs : 1.92 0.89 -53%
local alloc : 6.81 3.12 -54%
expand : 15.06 5.18 -65%
combiner : 4.59 1.04 -77%
TOTAL : 92.60 220.32 138%
I'm a bit surprised that the inliner is taking such a big hit. What
exactly is the varconst pass? We are giving more work to the garbage
collector, not entirely surprising. I still haven't examined the other
passes.
The results are a mixed bag. The SSA passes seem to be helping a few
RTL passes, particularly combine, but we get such a tremendous hit from
the other passes that the end result is more than 2 times slower.
Anyway, lots of things to do. Clearly.
Diego.
More information about the Gcc
mailing list