diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-01-03 23:10:11 +0000 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2019-01-03 23:10:11 +0000 |
commit | 777d01c756de7413c8232debda52f1c7f2b34ed9 (patch) | |
tree | 2aa6ddf5ccf9b104bcfda49b69c36e96ef15ef7a /lldb/packages/Python | |
parent | 820c6263d95f4bf5f89e4fa2e24d4466ae7e0166 (diff) | |
download | bcm5719-llvm-777d01c756de7413c8232debda52f1c7f2b34ed9.tar.gz bcm5719-llvm-777d01c756de7413c8232debda52f1c7f2b34ed9.zip |
[WebAssembly] Optimize Irreducible Control Flow
Summary:
Irreducible control flow is not that rare, e.g. it happens in malloc and
3 other places in the libc portions linked in to a hello world program.
This patch improves how we handle that code: it emits a br_table to
dispatch to only the minimal necessary number of blocks. This reduces
the size of malloc by 33%, and makes it comparable in size to asm2wasm's
malloc output.
Added some tests, and verified this passes the emscripten-wasm tests run
on the waterfall (binaryen2, wasmobj2, other).
Reviewers: aheejin, sunfish
Subscribers: mgrang, jgravelle-google, sbc100, dschuff, llvm-commits
Differential Revision: https://reviews.llvm.org/D55467
Patch by Alon Zakai (kripken)
llvm-svn: 350367
Diffstat (limited to 'lldb/packages/Python')
0 files changed, 0 insertions, 0 deletions