austern     02/11/08 15:20:06

  Modified:    live/gcc3/gcc timevar.c timevar.h
  Log:
  Reviewed by: Geoff
  Use double instead of float for timevar.  Float has insufficient precision.
  
  Revision  Changes    Path
  1.13      +5 -5      src/live/gcc3/gcc/timevar.c
  
  Index: timevar.c
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/timevar.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- timevar.c 2002/11/07 23:59:21     1.12
  +++ timevar.c 2002/11/08 23:20:06     1.13
  @@ -136,13 +136,13 @@
      precompute them.  Whose wonderful idea was it to make all those
      _constants_ variable at run time, anyway?  */
   #ifdef USE_TIMES
  -static float ticks_to_msec;
  -#define TICKS_TO_MSEC (1 / (float)TICKS_PER_SECOND)
  +static double ticks_to_msec;
  +#define TICKS_TO_MSEC (1 / (double)TICKS_PER_SECOND)
   #endif
   
   #ifdef USE_CLOCK
  -static float clocks_to_msec;
  -#define CLOCKS_TO_MSEC (1 / (float)CLOCKS_PER_SEC)
  +static double clocks_to_msec;
  +#define CLOCKS_TO_MSEC (1 / (double)CLOCKS_PER_SEC)
   #endif
   
   #include "flags.h"
  @@ -499,7 +499,7 @@
     for (id = 0; id < (unsigned int) TIMEVAR_LAST; ++id)
       {
         struct timevar_def *tv = &timevars[(timevar_id_t) id];
  -      const float tiny = 5e-3;
  +      const double tiny = 5e-3;
   
         /* Don't print the total execution time here; that goes at the
         end.  */
  
  
  
  1.5       +3 -3      src/live/gcc3/gcc/timevar.h
  
  Index: timevar.h
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/timevar.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- timevar.h 2002/08/02 10:05:34     1.4
  +++ timevar.h 2002/11/08 23:20:06     1.5
  @@ -53,14 +53,14 @@
   struct timevar_time_def
   {
     /* User time in this process.  */
  -  float user;
  +  double user;
   
     /* System time (if applicable for this host platform) in this
        process.  */
  -  float sys;
  +  double sys;
   
     /* Wall clock time.  */
  -  float wall;
  +  double wall;
   };
   
   /* An enumeration of timing variable identifiers.  Constructed from
  
  
  


Reply via email to