Alon Zakai
Alon Zakai
cc @aheejin given that bisection result.
This makes a lot of sense, but the main work would be on the LLVM side. Perhaps LLVM's internal CFI and other analyses can be used to separate into tables....
Binaryen could separate into tables based on the call_indirect function signature, but it wouldn't add any information. I'm not sure if it would unlock any optimizations. The larger benefit here...
@sbc100 > It could remove the type check though. [..] At the cost of N times the table space. Ah, good point, it could help that way at least. Interesting...
> A possible solution may be to iterate over a Wasm component and find the core modules within it, apply current wasm-opt optimizations on each core module, then repackage the...
Good point, inlining would be potentially very useful here. Merging it all first makes sense, but in that case 1. Do external tools not exist to do that merging already?...
I see, thanks @alexcrichton Yeah, if components have such a sealed view of the world, then merging the modules in a component first before optimizing seems a good option as...
@tlively Yeah, that definitely sounds nontrivial, but isn't that the plan for running components in the browser, to merge/lower them into an MVP module (+JS glue maybe)? I may have...
Thanks @alexcrichton ! Ok, then IIUC for the web the "optimize each module" approach is done or at least possible using jco. For non-web, I imagine a tool would call...
@mh4ck-Thales An error makes sense, I agree. I opened https://github.com/WebAssembly/binaryen/pull/6751 for that now. Please take a look as I am not familiar with the component binary format.