Stay calm - this is no more than an idea in progress.
I’m curious if anyone else is looking into stack safety through compile time analysis - a subset of Rust without recursion or calloca. Based on my initial investigation, there would need to be some small changes to the LLVM shim to enable calling
addPassesToEmitFile() with a
StopAfter as the prologue pass.
I could see a lint copying the AST, doing a dummy codegen pass and extracting the stack sizes from the resulting LLVM context.
Is anyone doing work in this area already?