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.
May I recommend returning the stack pointer via the return value rather than the argument? This way we can use LLVM IR's noalias attribute for the return value at the call site to say that the returned memory is "a new allocation" (https://llvm.org/docs/LangRef.html#parameter-attributes).