History log of /llvm-project/flang/runtime/unit-map.cpp (Results 1 – 13 of 13)
Revision Date Author Comments
# 71e0261f 15-Mar-2024 Slava Zakharin <szakharin@nvidia.com>

[flang][runtime] Added Fortran::common::optional for use on device.

This is a simplified implementation of std::optional that can be used
in the offload builds for the device code. The methods are p

[flang][runtime] Added Fortran::common::optional for use on device.

This is a simplified implementation of std::optional that can be used
in the offload builds for the device code. The methods are properly
marked with RT_API_ATTRS so that the device compilation succedes.

Reviewers: klausler, jeanPerier

Reviewed By: jeanPerier

Pull Request: https://github.com/llvm/llvm-project/pull/85177

show more ...


# 03c066ab 03-Jun-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Catch OPEN of connected file

Diagnose OPEN(FILE=f) when f is already connected by the same name to
a distinct external I/O unit.

Differential Revision: https://reviews.llvm.org/D12

[flang][runtime] Catch OPEN of connected file

Diagnose OPEN(FILE=f) when f is already connected by the same name to
a distinct external I/O unit.

Differential Revision: https://reviews.llvm.org/D127035

show more ...


# 73b193ae 16-Feb-2022 Peter Klausler <pklausler@nvidia.com>

[flang] Allow more concurrently open NEWUNIT= values, with recycling

Add a header-only implementation of Briggs & Torczon's fast small
integer set data structure to flang/include/flang/Common, and u

[flang] Allow more concurrently open NEWUNIT= values, with recycling

Add a header-only implementation of Briggs & Torczon's fast small
integer set data structure to flang/include/flang/Common, and use
it in the runtime to manage a pool of Fortran unit numbers with
recycling. This replaces the bit set previously used for that
purpose. The set is initialized on demand with the negations of
all the NEWUNIT= unit numbers that can be returned to any kind
of integer variable.

For programs that require more concurrently open NEWUNIT= unit
numbers than the pool can hold, they are now allocated with a
non-recycling counter. This allows as many open units as the
operating system provides.

Many of the top-line comments in flang/unittests/Runtime had the
wrong path name. I noticed this while adding a unit test for the
fast integer set data structure, and cleaned them up.

Differential Revision: https://reviews.llvm.org/D120685

show more ...


# c7f4c333 26-Jan-2022 Peter Klausler <pklausler@nvidia.com>

[flang] Make NEWUNIT= use a range suitable for INTEGER(KIND=1) and recycle unit numbers

Use a bit-set to manage runtime-generated I/O unit numbers, recycle
them after they're closed, and use a range

[flang] Make NEWUNIT= use a range suitable for INTEGER(KIND=1) and recycle unit numbers

Use a bit-set to manage runtime-generated I/O unit numbers, recycle
them after they're closed, and use a range of values that fits in
a minimal-sized integer.

Differential Revision: https://reviews.llvm.org/D118651

show more ...


# c84616c3 04-Dec-2021 Peter Klausler <pklausler@nvidia.com>

[flang] Avoid potential deadlock in CloseAll()

When closing all open units, don't hold the unit map lock
over the actual close operations; if one of those aborts,
CloseAll() may be called and then d

[flang] Avoid potential deadlock in CloseAll()

When closing all open units, don't hold the unit map lock
over the actual close operations; if one of those aborts,
CloseAll() may be called and then deadlock.

Differential Review: https://reviews.llvm.org/D115184

show more ...


# 651f58bf 02-Sep-2021 Diana Picus <diana.picus@linaro.org>

[flang] Remove *- C++ -* incantation from runtime .cpp files. NFC

We should only need to spell the language out in .h files.

Differential Revision: https://reviews.llvm.org/D109138


# cd0a1226 28-Jun-2021 peter klausler <pklausler@nvidia.com>

[flang] Fix "non-advancing" I/O, support $ in FORMAT

Non-advancing I/O was failing; ExternalFileUnit was losing
track of what writes had been committed to the file. Fixed.
Also, support the common

[flang] Fix "non-advancing" I/O, support $ in FORMAT

Non-advancing I/O was failing; ExternalFileUnit was losing
track of what writes had been committed to the file. Fixed.
Also, support the common extension of $ and \ in a FORMAT
as being equivalent to ADVANCE=NO.

Differential Revision: https://reviews.llvm.org/D105046

show more ...


# 43fadefb 25-Jun-2021 peter klausler <pklausler@nvidia.com>

[flang] Implement user-defined derived type runtime I/O

With derived type description tables now available to the
runtime library, it is possible to implement the concept
of "child" I/O statements i

[flang] Implement user-defined derived type runtime I/O

With derived type description tables now available to the
runtime library, it is possible to implement the concept
of "child" I/O statements in the runtime and use them to
convert instances of derived type I/O data transfers into
calls to user-defined subroutines when they have been specified
for a type. (See Fortran 2018, subclauses 12.6.4.8 & 13.7.6).

- Support formatted, list-directed, and NAMELIST
transfers to internal parent units; support these, and unformatted
transfers, for external parent units.
- Support nested child defined derived type I/O.
- Parse DT'foo'(v-list) FORMAT data edit descriptors and passes
their strings &/or v-list values as arguments to the defined
formatted I/O routines.
- Fix problems with this feature encountered in semantics and
FORMAT valiation during development and end-to-end testing.
- Convert typeInfo::SpecialBinding from a struct to a class
after adding a member function.

Differential Revision: https://reviews.llvm.org/D104930

show more ...


# 675ad1bc 03-Aug-2020 peter klausler <pklausler@nvidia.com>

[flang] Implement runtime support for INQUIRE statements

Differential Revision: https://reviews.llvm.org/D85166


# 0006354c 03-Jul-2020 peter klausler <pklausler@nvidia.com>

[flang] Further implementation of external I/O unit operations (part 6)

Rework initial implementation of external I/O unit operations to
fix problems exposed in unit tests (in a later patch). Add f

[flang] Further implementation of external I/O unit operations (part 6)

Rework initial implementation of external I/O unit operations to
fix problems exposed in unit tests (in a later patch). Add flushing.

Reviewed By: sscalpone

Differential Revision: https://reviews.llvm.org/D83147

show more ...


# 98d576c7 03-Jul-2020 peter klausler <pklausler@nvidia.com>

[flang] Improve API for runtime allocator (I/O runtime work part 3)

New<A> used to return an A&; now it returns an OwningPtr<A>
to force better ownership tracking of allocations. Its API
has also b

[flang] Improve API for runtime allocator (I/O runtime work part 3)

New<A> used to return an A&; now it returns an OwningPtr<A>
to force better ownership tracking of allocations. Its API
has also been split into New<A> and SizedNew<A> to allow
allocations with a size override.

Reviewed By: tskeith

Differential Revision: https://reviews.llvm.org/D83108

show more ...


# 1f879005 29-Mar-2020 Tim Keith <tkeith@nvidia.com>

[flang] Reformat with latest clang-format and .clang-format

Original-commit: flang-compiler/f18@9fe84f45d7fd685051004678d6b5775dcc4c6f8f
Reviewed-on: https://github.com/flang-compiler/f18/pull/1094


# 3b635714 13-Feb-2020 peter klausler <pklausler@nvidia.com>

[flang] Use hash table for UnitMap, avoid C++ STL binary dependence

Scan FORMAT strings locally to avoid C++ binary runtime dependence when computing deepest parenthesis nesting

Remove a dependency

[flang] Use hash table for UnitMap, avoid C++ STL binary dependence

Scan FORMAT strings locally to avoid C++ binary runtime dependence when computing deepest parenthesis nesting

Remove a dependency on ostream from runtime

Remove remaining direct external references from runtime to C++ library binaries

Remove runtime dependences on lib/common

SetPos() and SetRec()

Instantiate templates for input

Begin input; rearrange locking, deal with CLOSE races

View()

Update error message in test to agree with compiler change

First cut at real input

More robust I/O runtime error handling

Debugging of REAL input

Add iostat.{h,cpp}

Rename runtime/numeric-* to runtime/edit-*

Move templates around, templatize integer output editing

Move LOGICAL and CHARACTER output from io-api.cpp to edit-output.cpp

Change pointer argument to reference

More list-directed input

Complex list-directed input

Use enum class Direction rather than bool for templates

Catch up with changes to master

Undo reformatting of Lower code

Use record number instead of subscripts for internal unit

Unformatted sequential backspace

Testing and debugging

Dodge bogus GCC warning

Add <cstddef> for std::size_t to fix CI build

Address review comments

Original-commit: flang-compiler/f18@50406b349609efdde76e48bf2caa039d031dd1c4
Reviewed-on: https://github.com/flang-compiler/f18/pull/1053

show more ...