This is a bit out of date, LLVM now has a stack-based target
included by default - WebAssembly. It has a "stackifier"
implementation (look for files with Stackify in the name inside
llvm/lib/Target/WebAssembly). However, stack transformations are in
fact somewhat of a pain point, that's one of the reasons Emscripten
(C/C++ to Wasm compiler) uses an additional tool after emitting code
using Clang/LLVM, though another popular Wasm toolchain does not.
Best,
Petr