[all-commits] [llvm/llvm-project] 73b193: [flang] Allow more concurrently open NEWUNIT= valu...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Feb 28 16:13:39 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 73b193aec21d5203bde76c76bd0a29c6f77daf36
      https://github.com/llvm/llvm-project/commit/73b193aec21d5203bde76c76bd0a29c6f77daf36
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-02-28 (Mon, 28 Feb 2022)

  Changed paths:
    A flang/include/flang/Common/fast-int-set.h
    M flang/runtime/io-api.cpp
    M flang/runtime/tools.h
    M flang/runtime/unit-map.cpp
    M flang/runtime/unit-map.h
    M flang/unittests/CMakeLists.txt
    A flang/unittests/Common/CMakeLists.txt
    A flang/unittests/Common/FastIntSetTest.cpp
    M flang/unittests/Runtime/BufferTest.cpp
    M flang/unittests/Runtime/CharacterTest.cpp
    M flang/unittests/Runtime/CommandTest.cpp
    M flang/unittests/Runtime/CrashHandlerFixture.cpp
    M flang/unittests/Runtime/CrashHandlerFixture.h
    M flang/unittests/Runtime/Format.cpp
    M flang/unittests/Runtime/Inquiry.cpp
    M flang/unittests/Runtime/ListInputTest.cpp
    M flang/unittests/Runtime/Matmul.cpp
    M flang/unittests/Runtime/MiscIntrinsic.cpp
    M flang/unittests/Runtime/Namelist.cpp
    M flang/unittests/Runtime/Numeric.cpp
    M flang/unittests/Runtime/NumericalFormatTest.cpp
    M flang/unittests/Runtime/Random.cpp
    M flang/unittests/Runtime/Reduction.cpp
    M flang/unittests/Runtime/RuntimeCrashTest.cpp
    M flang/unittests/Runtime/Time.cpp
    M flang/unittests/Runtime/Transformational.cpp
    M flang/unittests/Runtime/tools.h

  Log Message:
  -----------
  [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




More information about the All-commits mailing list