[PATCH] D95125: [WebAssembly] Enable loop unrolling
Alon Zakai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 21 14:19:36 PST 2021
kripken added a comment.
Very interesting perf data!
Overall it seems like a speedup of around 10% for a size cost of 10% (with much more on one case, showing outliers are possible). That is significant and would support enabling it when not optimizing for size.
However, wasm VMs may eventually do loop unrolling themselves, so the speedup here may evaporate over time, while the code size cost will not. That, and the possibility of outliers on code size, worry me. So personally I would suggest considering not doing this for now, and approaching the VM people with the data, as motivation for them to do it.
Overall my personal philosophy is that anything that regresses code size should preferably be done in the wasm VM. But there are exceptions of course, like inlining, and maybe this is another.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95125/new/
https://reviews.llvm.org/D95125
More information about the llvm-commits
mailing list