aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorPeter Klausler <pklausler@nvidia.com>2025-06-16 14:37:01 -0700
committerGitHub <noreply@github.com>2025-06-16 14:37:01 -0700
commit2bf3ccabfa37ee1b2d74da7b370cdb16a5cc8ac0 (patch)
treebf25b8fd6180e2e06a4af67929e7dede8bc22ad9 /llvm/lib/IR/Module.cpp
parent65b06cd983e59c25f30b680167559a4db2b44609 (diff)
downloadllvm-2bf3ccabfa37ee1b2d74da7b370cdb16a5cc8ac0.zip
llvm-2bf3ccabfa37ee1b2d74da7b370cdb16a5cc8ac0.tar.gz
llvm-2bf3ccabfa37ee1b2d74da7b370cdb16a5cc8ac0.tar.bz2
[flang] Restructure runtime to avoid recursion (relanding) (#143993)
Recursion, both direct and indirect, prevents accurate stack size calculation at link time for GPU device code. Restructure these recursive (often mutually so) routines in the Fortran runtime with new implementations based on an iterative work queue with suspendable/resumable work tickets: Assign, Initialize, initializeClone, Finalize, and Destroy. Default derived type I/O is also recursive, but already disabled. It can be added to this new framework later if the overall approach succeeds. Note that derived type FINAL subroutine calls, defined assignments, and defined I/O procedures all perform callbacks into user code, which may well reenter the runtime library. This kind of recursion is not handled by this change, although it may be possible to do so in the future using thread-local work queues. (Relanding this patch after reverting initial attempt due to some test failures that needed some time to analyze and fix.) Fixes https://github.com/llvm/llvm-project/issues/142481.
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions