News for hackers. Stuff that matters.
Re:WebAssembly 2.0 First Working Draft by torginus on Tuesday April 19, 2022 @04:37PM (#31088731)
Why would Wasm engines need to do inlining and dead code elimination? My impression was that Wasm is basically native level-code, save for register allocation, and some arch-specific peephole optimizations. Dead code elimination is the job of the C++ compiler.
Re:WebAssembly 2.0 First Working Draft by titzer on Tuesday April 19, 2022 @05:31PM (#31089511)
Generally, I don't disagree, but not all producers are LLVM. And JS inlining is driven by dynamic heuristics, speculatively inlining likely candidates, whereas statically-compiled C++ code generally doesn't have speculative inlining. So a Wasm call_indirect will not get dynamically optimized into a guarded inline.