summaryrefslogtreecommitdiff
path: root/src/passes/LocalSubtyping.cpp
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2021-08-02 16:30:26 +0300
committerGitHub <noreply@github.com>2021-08-02 13:30:26 +0000
commitf35f02c1ce1b3129aa83d2dddeababd414c1ca8f (patch)
tree52b70c4193f77d63615f6571458248cf055c62a8 /src/passes/LocalSubtyping.cpp
parent512033eed52fff82274650aca7d7374b4b305551 (diff)
downloadbinaryen-f35f02c1ce1b3129aa83d2dddeababd414c1ca8f.tar.gz
binaryen-f35f02c1ce1b3129aa83d2dddeababd414c1ca8f.tar.bz2
binaryen-f35f02c1ce1b3129aa83d2dddeababd414c1ca8f.zip
[JS] Add a new OptimizeForJS pass (#4033)
Add a new OptimizeForJS pass which contains rewriting rules specific to JavaScript. LLVM usually lowers x != 0 && (x & (x - 1)) == 0 (isPowerOf2) to popcnt(x) == 1 which is ok for wasm and other targets but is quite expensive for JavaScript. In this PR we lower the popcnt pattern back to the isPowerOf2 pattern.
Diffstat (limited to 'src/passes/LocalSubtyping.cpp')
0 files changed, 0 insertions, 0 deletions