The intention is to use these APIs for copyin/copyout of subprogram
arguments at the call sites. Currently, Flang generates loop nests
to do this, and in some corner cases this results in very long
compilation times due to LLVM loop optimizations.
For example, Flang produces 25245 loops for 521.wrf/module_dm.f90.
If we extract the copyin/copyout loops into runtime, Flang will only
produce 207 loops, and the compilation time may reduce by 47x.
Given that the copyin/copyout loop nests can not be fused with other
loop nests, extracting them into runtime functions should not reduce
performance if the runtime optimizes the leading contiguous dimension
copies.
The implementation will come in separate patches.
I think std::size_t usage here is breaking the windows build. As far I understand, std::size_t is not defined in <cstdint> (that defines uintmax_t instead), but in <cstddef> and some other headers.