[PATCH] noclobber & noescape annotations for function arguments
Richard Guenther
rguenther@suse.de
Fri May 7 09:48:00 GMT 2010
On Fri, 7 May 2010, Tobias Burnus wrote:
> On 05/07/2010 10:58 AM, Richard Guenther wrote:
> >> Currently that's the plan, yes; with AIO, dt_parm is copied to a work
> >> queue in heap memory, from where a thread pool then executes the IO in
> >> the background. For the transfer_XXX() calls, pointers to the
> >> arguments are stored in the work queue.
> >>
>
> One could still call different functions. The standard gives some
> optimization help (all references to Fortran 2008 FDIS, N1826):
> a) All variables involved in asynchronous I/O have to be (explicitly or
> implicitly) marked with the ASYNCHRONOUS attribute, cf. Section 5.3.4.
> b) In each data-transfer statement (READ, WRITE) the ASYNCHRONOUS='YES'
> argument has to be given and 'YES' has to be a constant expression (and
> is thus known at compile time, allowing to call different functions),
> cf. Section 9.6.2.1 and 9.6.2.5.
>
> > Ok, so the arguments do escape to the functions. I suppose the
> > caller of the AIO has to ensure it does not change the data before
> > the AIO has completed?
> >
>
> Yes, e.g. using WAIT(unit=unit-number) or
> INQUIRE(unit=...,pending=logical_var)
>
> > Well, at least with the current I/O setup it seems to be impossible
> > to assert anything useful for the optimizers just depending on
> > the function that is called.
> >
>
> I think one could split library functions called for READ and WRITE,
> which would allow for a more useful annotation.
The most immediate useful annotation would be to assert that the
arguments do not escape. Which is not true for async I/O.
Is it true at the moment (as async I/O is not implemented)?
Richard.
More information about the Fortran
mailing list