|sequential binary parallelization at run-time firstname.lastname@example.org (Lauren) (2007-10-25)|
|Re: sequential binary parallelization at run-time email@example.com (George Neuner) (2007-10-27)|
|Unpopular parameter passing mechanisms and parallelisation (was Re: se firstname.lastname@example.org (Anton Lokhmotov) (2007-10-28)|
|Re: Unpopular parameter passing mechanisms and parallelisation (was Re email@example.com (George Neuner) (2007-10-30)|
|Re: Unpopular parameter passing mechanisms and parallelisation (was Re firstname.lastname@example.org (glen herrmannsfeldt) (2007-10-30)|
|From:||glen herrmannsfeldt <email@example.com>|
|Date:||Tue, 30 Oct 2007 23:24:45 -0800|
|References:||07-10-082 07-10-089 07-10-091 07-10-098|
George Neuner wrote:
> 28 Oct 2007 19:06:41 +0000, Anton Lokhmotov <firstname.lastname@example.org> wrote:
>>As for imperative programming, another undeservedly abandoned
>>parameter passing semantics is call-by-value-result (CBVR). In CBVR,
>>writes to the caller's memory by the callee do not happen until the
>>callee returns but the callee keeps track of them.
> <snip examples>
Fortran still allows call-by-value-result.
I first knew it used for scalar variables (only) on the
OS/360 Fortran G and H compilers. (Probably E also.)
For S/360 it is more efficient in time and space to copy a
scalar to local memory, addressed by the same base register
as the other data, and copy back later. In most cases it
takes two instructions to reference a variable through its
address. (One to load the address into a register, the
second to load or store as appropriate). For arrays,
OS/360 always does call by reference.
>>This semantics is similar to that of vector assignment statements in
>>Fortran 90 (which we discussed here around August) and allows the
>>callee's code to be automatically parallelised even if it contains
>>references or pointers that can potentially alias (which complicates
>>dependence analysis in mainstream programming languages).
The usual case in current compilers is that in some cases Fortran
allows non-contiguous arrays to be passed. In other cases, arrays
are assumed contiguous. That can require a copy to be made before
the call, and copy back after, usually done by the caller not the
callee but the effect is the same.
> Fortran's semantics were designed to correspond with the behavior of
> real hardware - serial pipelined vector processors.
> As a parameter passing method, CBVR was deprecated because most
> programmers found it confusing.
They still do, but it is still allowed.
Return to the
Search the comp.compilers archives again.