This is the mail archive of the
mailing list for the GCC project.
Re: [fortran PATCH] Implement a(:,:) = 0.0 using memset (take 2)
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: roger at eyesopen dot com
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Wed, 20 Dec 2006 10:40:10 -0800
- Subject: Re: [fortran PATCH] Implement a(:,:) = 0.0 using memset (take 2)
- References: <B7EFA6A886FE514B8F7F3E277D8F7FB0FFA277@ukaprdembx01.rd.astrazeneca.net> <email@example.com>
On Wed, Dec 20, 2006 at 10:56:22AM -0700, firstname.lastname@example.org 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.