[PATCH] D60966: [WebAssembly] Emit br_table for most switch instructions

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 07:48:14 PDT 2019


aheejin created this revision.
aheejin added reviewers: kripken, sunfish, dschuff.
Herald added subscribers: llvm-commits, jgravelle-google, sbc100.
Herald added a project: LLVM.

Always convert switches to br_tables unless there is only one case,
which is equivalent to a simple branch. This reduces code size for wasm,
and we defer possible jump table optimizations to v8. Addresses PR41502.


Repository:
  rL LLVM

https://reviews.llvm.org/D60966

Files:
  lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  test/CodeGen/WebAssembly/cfg-stackify.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60966.196073.patch
Type: text/x-patch
Size: 4366 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190422/75712453/attachment.bin>


More information about the llvm-commits mailing list