[flang][runtime] Avoid recursive calls in F18 runtime CUDA build. (#87428)
commit2b86fb21f8402f19da7e5887a9572b3d55052991
authorSlava Zakharin <szakharin@nvidia.com>
Wed, 3 Apr 2024 04:03:49 +0000 (2 21:03 -0700)
committerGitHub <noreply@github.com>
Wed, 3 Apr 2024 04:03:49 +0000 (2 21:03 -0700)
treee9d0173ffbe52e3fe6802f09c4e75f2d4566b51c
parent324436c29ffd14bcf96c94500d5e43391f2b1e51
[flang][runtime] Avoid recursive calls in F18 runtime CUDA build. (#87428)

Recurrencies in the call graph (even if they are not executed)
prevent computing the minimal stack size required for a kernel
execution. This change disables some functionality of F18 IO
to avoid recursive calls. A couple of functions are rewritten
to work without using recursion.
flang/include/flang/Common/api-attrs.h
flang/runtime/descriptor-io.h
flang/runtime/edit-output.cpp
flang/runtime/emit-encoded.h
flang/runtime/io-stmt.cpp
flang/runtime/io-stmt.h
flang/runtime/unit.cpp
flang/runtime/unit.h