- if ( childp -> cyclehead != childp ) {
- if ( parentp -> cycleno == childp -> cycleno ) {
- continue;
- }
-# ifdef DEBUG
- if ( debug & ARCDEBUG ) {
- printf( "[doarcs]\t it's a call into cycle %d\n" ,
- childp -> cycleno );
- }
-# endif DEBUG
- if ( parentp -> toporder <= childp -> toporder ) {
- fprintf( stderr , "[doarcs] toporder botches\n" );
- }
- childp = childp -> cyclehead;
- } else {
- if ( parentp -> toporder <= childp -> toporder ) {
- fprintf( stderr , "[doarcs] toporder botches\n" );
- continue;
- }
+ }
+ /*
+ * distribute time for this arc
+ */
+ arcp -> arc_time = childp -> time *
+ ( ( (double) arcp -> arc_count ) /
+ ( (double) childp -> ncall ) );
+ arcp -> arc_childtime = childp -> childtime *
+ ( ( (double) arcp -> arc_count ) /
+ ( (double) childp -> ncall ) );
+ share = arcp -> arc_time + arcp -> arc_childtime;
+# ifdef DEBUG
+ if ( debug & ARCDEBUG ) {
+ printf( "[propagate]\t " );
+ printname( childp );
+ printf( " time %8.2f + childtime %8.2f\n" ,
+ childp -> time , childp -> childtime );
+ printf( "[propagate]\t this is %d arcs of the %d calls\n",
+ arcp -> arc_count , childp -> ncall );
+ printf( "[propagate]\t so this gives %8.2f+%8.2f to %s\n" ,
+ arcp -> arc_time , arcp -> arc_childtime ,
+ parentp -> name );