This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: [OpenCoarrays] RFC patch: Dependency/alias analysis wir same-image coarray access


Alessandro Fanfarillo wrote:
The compiler participation could be useful for performance purposes.
The idea is:

1) the library checks if source and destination are the same and if
the compiler finds an aliasing.

I assume you mean: source and target are on the same image. (Which for caf_sendget might be not the executing one.)

2) If the compiler does not find anything, the library just applies memmove.

Ditto if memory source and destination are contiguous. That's in line with the current compiler check but can in general only be done at run time - and, for performance reasons, this check is already done. (One could also check more as the compiler cannot do all checks at compile time; one could also support walking the array in reverse order etc. However, I don't think that's worthwhile.)

3) If the compiler find an aliasing, the library does not do anything.

I do not understand your 3: If the library doesn't do anything, you get wrong results for
  a(5:1:-1)[1] = a(1:5:1)

I think what one wants is the following: The library creates a temporary array and first assigns to it - before assigning from the temporary to the target variable.

Tobias


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