llvm/flang/runtime
Peter Klausler deb62f5ad6 [flang][runtime] Clean up asynchronous I/O APIs
Now that the requirements and implementation of asynchronous I/O are
better understood, adjust their I/O runtime APIs.  In particular:
1) Remove the BeginAsynchronousOutput/Input APIs; they're not needed,
   since any data transfer statement might have ASYNCHRONOUS= and
   (if ASYNCHRONOUS='YES') ID= control list specifiers that need to
   at least be checked.
2) Add implementations for BeginWait(All) to check for the error
   case of a bad unit number and nonzero ID=.
3) Rearrange and comment SetAsynchronous so that it's clear that
   it can be called for READ/WRITE as well as for OPEN.

The implementation remains completely synchronous, but should be conforming.
Where opportunities make sense for true asynchronous implementations of
some big block transfers without SIZE= in the future, we'll need to add
a GetAsynchronousId API to capture ID= on a READ or WRITE; add sourceFile
and sourceLine arguments to BeginWait(All) for good error reporting;
track pending operations in unit.h; and add code to force synchronization
to non-asynchronous I/O operations.

Lowering should call SetAsynchronous when ASYNCHRONOUS= appears as
a control list specifier.  It should also set ID=x variables to 0
until such time as we support asynchronous operations, if ever.
This patch only removes the removed APIs from lowering.

Differential Revision: https://reviews.llvm.org/D126143
2022-05-24 07:54:57 -07:00
..
FortranMain [flang][Runtime] Use proper prototypes in Fortran_main. NFCI 2022-05-18 08:04:09 +00:00
allocatable.cpp
assign.cpp
buffer.cpp
buffer.h
character.cpp [flang] Change "bad kind" messages in the runtime to "not yet implemented" 2022-05-10 20:08:03 -07:00
CMakeLists.txt [flang][driver] Add support for generating executables 2022-04-25 12:00:23 +00:00
command.cpp Fix invalid overflow check in flang 2022-03-30 16:47:33 +02:00
complex-reduction.c
complex-reduction.h
config.h.cmake
connection.cpp
connection.h [flang][runtime] Don't pad CHARACTER input at end of record unless PAD='YES' 2022-05-09 12:39:43 -07:00
copy.cpp
copy.h
derived-api.cpp
derived.cpp
derived.h
descriptor-io.cpp
descriptor-io.h [flang] Initial UTF-8 support in runtime I/O 2022-03-22 11:48:14 -07:00
descriptor.cpp [flang][runtime] Ensure PointerDeallocate actually deallocate pointers 2022-03-28 10:22:08 +02:00
dot-product.cpp
edit-input.cpp [flang][runtime] Don't pad CHARACTER input at end of record unless PAD='YES' 2022-05-09 12:39:43 -07:00
edit-input.h [flang] Initial UTF-8 support in runtime I/O 2022-03-22 11:48:14 -07:00
edit-output.cpp [flang][runtime] (G0) for CHARACTER means (A), not (A0) 2022-05-09 13:00:15 -07:00
edit-output.h [flang] Initial UTF-8 support in runtime I/O 2022-03-22 11:48:14 -07:00
environment.cpp [flang] Initial UTF-8 support in runtime I/O 2022-03-22 11:48:14 -07:00
environment.h [flang] Initial UTF-8 support in runtime I/O 2022-03-22 11:48:14 -07:00
extensions.cpp
extrema.cpp [flang] Fix MAXLOC/MINLOC when MASK is scalar .FALSE. 2022-04-27 14:50:00 -07:00
file.cpp
file.h
findloc.cpp
format-implementation.h [flang][runtime] Enforce restrictions on unlimited format repetition 2022-05-09 12:48:23 -07:00
format.cpp
format.h
inquiry.cpp
internal-unit.cpp [flang] Initial UTF-8 support in runtime I/O 2022-03-22 11:48:14 -07:00
internal-unit.h [flang] Initial UTF-8 support in runtime I/O 2022-03-22 11:48:14 -07:00
io-api.cpp [flang][runtime] Clean up asynchronous I/O APIs 2022-05-24 07:54:57 -07:00
io-error.cpp
io-error.h [flang][runtime] Clean up asynchronous I/O APIs 2022-05-24 07:54:57 -07:00
io-stmt.cpp [flang][runtime] BACKSPACE after non-advancing I/O 2022-05-09 13:00:41 -07:00
io-stmt.h [flang][runtime] Clean up asynchronous I/O APIs 2022-05-24 07:54:57 -07:00
iostat.cpp [flang][runtime] Clean up asynchronous I/O APIs 2022-05-24 07:54:57 -07:00
ISO_Fortran_binding.cpp
lock.h
main.cpp
matmul.cpp
memory.cpp
misc-intrinsic.cpp
namelist.cpp [flang] Initial UTF-8 support in runtime I/O 2022-03-22 11:48:14 -07:00
namelist.h
numeric.cpp
pointer.cpp [flang][runtime] Ensure PointerDeallocate actually deallocate pointers 2022-03-28 10:22:08 +02:00
product.cpp
ragged.cpp
random.cpp [flang] Change "bad kind" messages in the runtime to "not yet implemented" 2022-05-10 20:08:03 -07:00
reduction-templates.h
reduction.cpp
stat.cpp
stat.h
stop.cpp
sum.cpp
support.cpp
terminator.cpp
terminator.h
time-intrinsic.cpp [flang] Use full result range for clock_gettime implementation of SYSTEM_CLOCK 2022-04-14 13:01:32 -07:00
tools.cpp [flang] Change "bad kind" messages in the runtime to "not yet implemented" 2022-05-10 20:08:03 -07:00
tools.h [flang] Change "unsupported" messages in the runtime to "not yet implemented" 2022-05-05 15:20:01 -07:00
transformational.cpp [flang] Change "bad kind" messages in the runtime to "not yet implemented" 2022-05-10 20:08:03 -07:00
type-code.cpp [flang][runtime] Fix KIND=16 real/complex component I/O 2022-04-25 11:18:21 -07:00
type-info.cpp [flang] Fix character length calculation for Unicode component 2022-05-23 17:48:12 -07:00
type-info.h
unit-map.cpp
unit-map.h
unit.cpp [flang][runtime] BACKSPACE after non-advancing I/O 2022-05-09 13:00:41 -07:00
unit.h [flang][runtime] Clean up asynchronous I/O APIs 2022-05-24 07:54:57 -07:00
utf.cpp [flang] Initial UTF-8 support in runtime I/O 2022-03-22 11:48:14 -07:00
utf.h [flang] Initial UTF-8 support in runtime I/O 2022-03-22 11:48:14 -07:00