This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: RFC: Patch to implement the fortran matmul/transpose optimisation
- From: Richard Sandiford <richard at codesourcery dot com>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Thu, 25 Aug 2005 19:01:38 +0100
- Subject: Re: RFC: Patch to implement the fortran matmul/transpose optimisation
- References: <87r7cixqpv.fsf@talisman.home><20050825165924.GA5258@troutmask.apl.washington.edu>
Steve Kargl <sgk@troutmask.apl.washington.edu> writes:
> On Thu, Aug 25, 2005 at 11:20:44AM +0100, Richard Sandiford wrote:
>> At the moment, we don't have an easy way of determining the intent
>> of an intrinsic function argument. The patch therefore treats all
>> such arguements as having unknown intent. Thus:
>>
>> b = matmul (transpose (a), a)
>>
>> will not be optimised, because we assume that the second argument
>> to matmul() might not be intent(in). This can be cleaned up later
>> if we ever have a direct representation of an intrinic function's
>> interface.
>>
>
> I don't understand this statement. All standard intrinsic procedures
> are pure (See 13.1). Section 12.6 in draft F2003 standard I have on
> hand, states
>
> C1266 The specification-part of a pure function subprogram shall
> specify that all its nonpointer dummy data objects have
> INTENT(IN).
>
> Thus, we know that transpose(a) and a have intent(in) in the above
> statement. What am I missing?
Probably nothing. I was told that some intrinsics weren't pure.
If that's not the case, then you're right, there's no need for
this restriction.
Richard