This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Multiple simplification calls
- From: law at redhat dot com
- To: jason at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 21 Feb 2003 09:49:24 -0700
- Subject: [tree-ssa] Multiple simplification calls
- Reply-to: law at redhat dot com
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