[flang][runtime] Add dynamically allocated temporary storage
authorTom Eccles <tom.eccles@arm.com>
Thu, 27 Apr 2023 09:53:54 +0000 (09:53 +0000)
committerTom Eccles <tom.eccles@arm.com>
Thu, 18 May 2023 10:48:45 +0000 (10:48 +0000)
commitc01937296b01f512e9074730e04ad0bedb40d089
tree335e29722ee4666410d19e2cb5d8447c0710c11e
parent407832db60c6f51ec5d9e5160670ee9756a340af
[flang][runtime] Add dynamically allocated temporary storage

These functions will be used as part of the HLFIR lowering for
forall/where. The contents of the API were requested by @jeanPerier.

The API is designed around that use case, assuming that the caller knows
through some side channel what size to allocate for boxes returned from
the pop() function.

Differential Revision: https://reviews.llvm.org/D150050
flang/include/flang/Runtime/temporary-stack.h [new file with mode: 0644]
flang/runtime/CMakeLists.txt
flang/runtime/temporary-stack.cpp [new file with mode: 0644]
flang/unittests/Runtime/CMakeLists.txt
flang/unittests/Runtime/TemporaryStack.cpp [new file with mode: 0644]