LLVM’s code generator divides allocas into two kinds: “static” and “dynamic”. “static” allocas are allocas with fixed size, located in the entry block of the function. These are generally allocated in the function prologue. “dynamic” allocas are everything else; they’re allocated when the “alloca” instruction executes.
If you have dynamic allocas, you probably want to look at llvm.stacksave/llvm.stackrestore. This is the closest to “adjusting the stack pointer”.
See also 7. Kaleidoscope: Extending the Language: Mutable Variables — LLVM 16.0.0git documentation .