A Function Inliner for Wasmtime and Cranelift

Note: I cross-posted this to the Bytecode Alliance blog . Function inlining is one of the most important compiler optimizations, not because of its direct effects, but because of the follow-up optimizations it unlocks. It may reveal, for example, that an otherwise-unknown function parameter value is bound to a constant argument, which makes a conditional branch unconditional, which in turn exposes…