This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ifcvt compile-time performance issue


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]