RFA: matmul/transpose optimisation

Richard Sandiford richard@codesourcery.com
Thu Dec 15 11:05:00 GMT 2005


Steve Kargl <sgk@troutmask.apl.washington.edu> writes:
> I've bootstrapped and regression tested your patch on amd64-*-freebsd.
> Everything tested ok.  My only question is with -fbounds-check option.
> Did you check the there are no strange side-effect?  I don't have
> any codes that use matmul, so I could not easily check this.

Sorry Steve, just realised I never answered this question.

And no, I'm afraid I didn't do any special checks for -fbounds-check.
What sort of thing did you have in mind?

You mention matmul, but the matmul changes themselves (i.e. the changes
to the matmul libgfortran function) should be invisible to the user
from a behavioural point of view.  The function does the same thing
whichever loop we pick.

The inline transpose changes should be behaviourally invisible too,
in theory.  You just get an array descriptor in which the first stride
is larger than the second.  If you pass such a descriptor to a
non-intrinsic function, it should still be able to correctly check
the array bounds, as I don't think the bounds-checking code makes any
assumptions about the stride.

I'm not too familiar with the bounds-checking code though, so there
could be a potential effect that I'm missing.  We shouldn't need codes
that use matmul to test that though.

Richard



More information about the Gcc-patches mailing list