This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ifcvt compile-time performance issue
- From: law at redhat dot com
- To: bernds at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 16 Feb 2004 16:27:06 -0700
- Subject: ifcvt compile-time performance issue
- Reply-to: law at redhat dot com
So just for giggles I re-ran the "where do we spend our time during make-check"
test again with Zdenek's fix for edge splitting (make-check time is driving
me nuts! :(
Much to my amazement, we find #1 on the charts:
083be7a0 275127 16.8253 cc1 if_convert
Eek.
99.6% of those samples come from this code in ifcvt.c:
: /* Count the number of edges the THEN and ELSE blocks have.
*/
: then_predecessors = 0;
5 3.1e-04 : for (cur_edge = then_bb->pred;
: cur_edge != NULL_EDGE;
: cur_edge = cur_edge->pred_next)
: {
: then_predecessors++;
3 1.8e-04 : if (cur_edge->flags & EDGE_COMPLEX)
: return FALSE;
: }
:
: else_predecessors = 0;
65906 4.0305 : for (cur_edge = else_bb->pred;
: cur_edge != NULL_EDGE;
: cur_edge = cur_edge->pred_next)
: {
: else_predecessors++;
208046 12.7230 : if (cur_edge->flags & EDGE_COMPLEX)
: return FALSE;
: }
Ouch.
Especially when you consider that we never even use the else_predecessor
count. The only thing we're doing in that loop is existing if we have a
complex edge.
You seemed to be the last one inside this code. Any thoughts on what
we might be able to do to speed it up?
jeff