[tree-ssa] Multiple simplification calls
law@redhat.com
law@redhat.com
Fri Feb 21 16:59:00 GMT 2003
So my goal for today was to at least better understand why gimplification
was so bloody slow (it accounts for over 2% of our compilation time right
now).
The first thing I noticed was that every function is gimplified twice,
yup, twice.
The first simplification happens when finish_function calls c_genericize,
which in turn calls simplify_function_tree.
The second happens a short while later when finish_function calls
c_expand_body which later calls simplify_function_tree.
Presumably we do this because something in between those two calls to
simplify_function_tree may create non-gimple code? If that's the case,
is there any way we can avoid creating non-gimple code or at least
keep track of the introduction of non-gimple code?
To give you some idea, right now simplification directly accounts for about
2.2% of our total compilation time for my tests (15.26 seconds). Avoiding
the second call gets that down to about 1.2% (8.38 seconds). As a secondary
effect the garbage collector has less work to do and we save another half
second there. There may be other secondary effects, but I haven't looked
for them :-)
Jeff
More information about the Gcc
mailing list