3 ms·
There’s no good reason for WebAssembly to be SSA. That is a good enough reason for it not to be. The purpose of SSA is to make it easier to write optimizations
by klodolph 7y ago
There’s no good reason for WebAssembly to be SSA. That is a good enough reason for it not to be.
The purpose of SSA is to make it easier to write optimizations. However, you wouldn’t be optimizing WASM anyway, you would necessarily translate it first into some kind of IR suitable for optimization passes. Might as well convert to SSA at that point, rather than bloat the bytecode by exposing implementation details of the target.
Remember that WASM’s purpose is to be portable and safe. Making it more complicated just in order to make sophisticated back-ends slightly faster is a net loss. Using SSA would also make naïve/simple backends slower.