This is the mail archive of the gcc-patches@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]

Re: Patch for IA64 performance (inline division)


> > 2004-02-26  Steve Ellcey  <sje@cup.hp.com>
> >
> > 	* config/ia64/ia64.h (no-inline-float-divide): New option.
> > 	* config/ia64/ia64.h (no-inline-int-divide): New option.
> > 	* config/ia64/ia64.h (no-inline-sqrt): New option.
> > 	(TARGET_DEFAULT): Add MASK_INLINE_FLOAT_DIV_THR to define.
> > 	* config/ia64/hpux.h (TARGET_DEFAULT): Ditto.
> > 	* config/ia64/ia64.c (ia64_override_options): Modify error
> > 	checking for inlined division/sqrt.
> 
> This is causing comparison failures on ia64-linux.

Whoops.  I did test this but I did a "make bootstrap;make check" and
then looked at the results of "make check".  Those results looked good
even though the "make bootstrap" failed because the compiler does pass
the test suite even though it failed the bootstrap.  I guess I need to
look at the results of the build and test a little more closely when I
combine the two.

Looking at the failure itself, I don't understand exactly why it is
failing but it seems to be related to the use of a floating point divide
in ggc_collect(ggc-page.c).  When I change the float value to size_t
(undoing a patch from Jan 2003) it bootstraps properly.  Since that
doesn't seem like the right fix what do people think of the attached
change to ggc_collect.  I haven't tested it yet but I will start it now.

I also don't understand why a difference in the GCC allocator would
affect global register allocation which is where the diff's start
happening.  It might be due to an uninitialized variable or something
and I will look into that too but the ggc_collect change seems like the
quickest way to get bootstrap working again on IA64 and seems like a
reasonable change that would help account for the fuzzyness of floating
point math.

Steve Ellcey
sje@cup.hp.com


2004-03-01  Steve Ellcey  <sje@cup.hp.com>

	* ggc-page.c: Deal with floating point rounding issue on divide.


*** gcc.orig/gcc/gcc/ggc-page.c	Mon Mar  1 10:18:00 2004
--- gcc/gcc/gcc/ggc-page.c	Mon Mar  1 10:18:34 2004
*************** ggc_collect (void)
*** 1908,1914 ****
    float allocated_last_gc =
      MAX (G.allocated_last_gc, (size_t)PARAM_VALUE (GGC_MIN_HEAPSIZE) * 1024);
  
!   float min_expand = allocated_last_gc * PARAM_VALUE (GGC_MIN_EXPAND) / 100;
  
    if (G.allocated < allocated_last_gc + min_expand)
      return;
--- 1908,1915 ----
    float allocated_last_gc =
      MAX (G.allocated_last_gc, (size_t)PARAM_VALUE (GGC_MIN_HEAPSIZE) * 1024);
  
!   float min_expand =
!     (allocated_last_gc * PARAM_VALUE (GGC_MIN_EXPAND) + 99) / 100;
  
    if (G.allocated < allocated_last_gc + min_expand)
      return;




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