3 ms·
> However, locals are a problem. They’re mutable, so you can’t trivially convert them to SSA As mentioned in previous discussions, that isn't accurate. Wasm lo
by azakai 4y ago
> However, locals are a problem. They’re mutable, so you can’t trivially convert them to SSA
As mentioned in previous discussions, that isn't accurate. Wasm locals can be easily converted to SSA, and that is exactly what all major wasm VMs have been doing since wasm launched. Wasm was designed to make that efficient.
Yes, you usually want to do liveness analysis on that SSA form. In theory that information could have been bundled into wasm, at the cost of code size (and a verification scheme). I'm not aware of data showing that that would have been a better tradeoff.
SSA conversion and locals in general are not a significant challenge for wasm VMs, neither in complexity nor generated code quality. As the author admits,
> optimising compilers will probably not generate better code from [possible changes]
There are other areas that actually are challenges for wasm atm, such as memory management (no mmap or even shrinking) and no irreducible control flow (may well be limiting performance on certain benchmarks, but data is lacking).
- hinkley 4y agoBy far the biggest change to the Java file format I can remember was when they added this kind of metadata to the files. It was meant to reduce startup time. I think they even made it mandatory at some point, which killed off a minifier I’d been enjoying. That developed during the era of papers about Proof Carrying Code, which I haven’t heard about in quite some time. So maybe the cachet has gone.