summaryrefslogtreecommitdiff
path: root/src/tools/wasm-merge.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-12-04 19:06:01 -0800
committerGitHub <noreply@github.com>2017-12-04 19:06:01 -0800
commit0d5a39f17a854b4241c2704a1269620687bb6a07 (patch)
tree0f30ebd3b848c93ef0e8a4efa2d40e32a2da42e7 /src/tools/wasm-merge.cpp
parente91d1bf256d70d0e1635dcf35a3d253d11555f58 (diff)
downloadbinaryen-0d5a39f17a854b4241c2704a1269620687bb6a07.tar.gz
binaryen-0d5a39f17a854b4241c2704a1269620687bb6a07.tar.bz2
binaryen-0d5a39f17a854b4241c2704a1269620687bb6a07.zip
br_if-to-table (#1313)
Implements #1309: subsequent br_ifs that compare the same value to various constants are converted into a br_table in a block, (br_if $x (i32.eq (get_local $a) (i32.const 0))) (br_if $y (i32.eq (get_local $a) (i32.const 1))) (br_if $z (i32.eq (get_local $a) (i32.const 2))) ==> (block $tablify (br_table $x $y $z $tablify (get_local $a) ) ) The constants for when to apply this (e.g., not if the range of values would make a huge jump table) are fairly conservative, I think, but hard to tell. Probably should be tweaked based on our experience with the pass in practice later on.
Diffstat (limited to 'src/tools/wasm-merge.cpp')
0 files changed, 0 insertions, 0 deletions