-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
emscripten-core/emsdk
#373Description
The upstream LLVM WebAssembly backend (along with its emscripten integration) is approaching parity with the fastcomp+asm2wasm pipeline, and we'd like to put in some extra effort to push it over the finish line, so that we can set it as the default for emscripten. I'd like to use this issue for discussion and maybe a tracking bug (although github's support for that use case isn't great; so maybe a project board instead?).
There are a few categories of stuff to think about:
- Bugs and missing LLVM/backend functionality (e.g. miscompiles, IR we don't lower yet)
- Missing emscripten features compared to fastcomp + asm
- Performance (compile time and generated code quality)
- ABI or any behavior changes that we don't necessarily consider a bug but need some sort of special consideration.
So what's the current status?
- There are a small number of known bugs (e.g. some tuning for the FixFunctionBitcasts pass, and the problem of optimizers moving trapping conversions outside of guard conditions) and known missing features. But the emscripten test suite works, and with a couple of hacks, large programs such as BananaBread work.
- IIRC there are a couple of these but no major ones. I think @jgravelle-google knows more.
- There has been some small investigation into this (but no large benchmarks that I know of?), but with @kripken's recent work in the binaryen optimizer I believe code performance is very close. There will be some compile time regression in the short term (until we get wasm-level linking), but hopefully not pathological.
- We know that the LLVM triple and its associated ABI is different, and we've talked about wanting to have asm.js and wasm triples match.
What do we need to do
- Fix the known bugs, obviously. @aheejin is taking another look at our existing lists of known failures to make sure we understand the causes. Because the new backend doesn't have the realworld hardening that fastcomp does, I would feel better if we had even a bit more testing. It would be nice to get the LLVM test suite running, even if in parallel to the other work. @sbc100 has started this.
- Do a bit more testing on larger benchmarks that we care about.
- I would like to merge the triples/ABIs in one way or another. We had talked about changing fastcomp to match the upstream backend in a lot of the cases (although I do want to get rid of 128-bit long doubles, it's proven already to be just not worth the upkeep cost). Although another option might be to think about using wasm2asm going forward.
Thoughts?
chicoxyzzy, floooh, mosra, RandomDSdevel, rektide and 8 more
Metadata
Metadata
Assignees
Labels
No labels