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: [fortran PATCH] Implement a(:,:) = 0.0 using memset (take 2)


On Wed, Dec 20, 2006 at 10:56:22AM -0700, roger@eyesopen.com wrote:
> > I think this is OK for trunk; however, Andrew did bring up
> > the potential problem of a signed zero.  I'm not sure if
> > -0 occurs very often in Fortran code, but we can guard against
> > this by changing your code
> > ...
> >                   && MPFR_SIGN (expr->value.real) == 1);
> > ...
> > MPFR_SIGN retrieves the sign bit from the mpfr_t structure.
> 
> Many thanks.  Committed to mainline after another bootstrap and
> regression test on x86_64-unknown-linux-gnu with a minor tweak;
> I was a little paranoid of the " == 1" in this test, so I went with a
> slightly more conservative (but equivalent) "MPFR_SIGN (...) >= 0;"
> [This avoids the magic number MPFR_POS_SIGN, and the middle-end
> prefers comparisons against zero :-)]  I also corrected the ChangeLog
> typos spotted by Bernhard.  I hope this was OK.

Yes, it was OK.  Thanks.

> > As a side note, I found that your patch provides a 7.2% decrease
> > in computation time for the Bergen Ocean Model (ie., your patch
> > is beneficial!).  There are 176 __builtin_memset calls in BOM
> > due to your patch.
> 
> I've managed to find the source code for BOM, but is there a particular
> release version number and input set you use for benchmarking?

I retrieved BOM more than a year ago, and I can't find a version 
number in code.  I wrote BSD style Makefile to built it.  I don't
remember if the testcase came with BOM or whether I generated it.

I can create a tarball of the code and put it someplace for you to
retrieve if you want a copy.

-- 
Steve


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