Closed
Description
Feature
LLVM has support for performing the stack probes directly in the function prologue instead of calling an external function. (see rust-lang/rust#77885 for using this in Rust)
Benefit
This can be faster due to being able to unroll the stack probe loop. It also avoids having to provide an external stack probe function. This makes it possible to enable stack probing in cg_clif. (https://github.com/bjorn3/rustc_codegen_cranelift/issues/661)
Implementation
This should only be implemented for the machinst backends. It should probably be added to either the gen_prologue
implementation or gen_prologue
caller.
Alternatives
Keep using an external stack probe function with the associated drawbacks.