Go to file
Heejin Ahn 777d01c756 [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
2019-01-03 23:10:11 +00:00
clang Fix check-hwasan with LLVM_BUILD_EXTERNAL_COMPILER_RT=ON 2019-01-03 22:50:45 +00:00
clang-tools-extra [clangd] Fix detecting atomics in stand-alone builds 2019-01-03 16:43:27 +00:00
compiler-rt Re-disable the sanitizer_common/TestCases/Posix/getfsent.cc test. Recent macOS versions don't have the /etc/fstab file any more so we cannot test getfsent/setfsent APIs on Darwin. 2019-01-03 17:26:29 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc travis: Add cmake build 2018-11-27 16:07:21 +00:00
libcxx De-tab a couple tests. NFC 2019-01-03 17:18:40 +00:00
libcxxabi [libcxx] Remove bad_array_length 2018-11-29 19:44:57 +00:00
libunwind [SEH] Add initial support for AArch64 2018-12-18 20:05:59 +00:00
lld [test] Enable system-linker-elf feature on NetBSD [NFC] 2019-01-02 19:39:26 +00:00
lldb TestQueues: Move the synchronisation code into the binary itself. 2019-01-03 22:34:48 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [WebAssembly] Optimize Irreducible Control Flow 2019-01-03 23:10:11 +00:00
openmp [OpenMP] Add omp_get_device_num() and update several other device API functions 2019-01-03 21:14:19 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [CMake] Fix generation of exported targets in build directory 2018-11-06 15:18:17 +00:00
pstl [pstl] Initial integration with LLVM's CMake 2018-12-21 15:59:04 +00:00
README.md Update the project name in README.md 2018-10-19 00:03:01 +00:00

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.