summaryrefslogtreecommitdiff
path: root/src/passes/Precompute.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-09-23 14:28:53 -0700
committerGitHub <noreply@github.com>2021-09-23 14:28:53 -0700
commit662f31c721ede0c3c2f5a455e711f4467225a475 (patch)
tree1ed08a837f0851988f1ff33bd0adb9c6fe366cc8 /src/passes/Precompute.cpp
parent31252873463fd142a1eabb71b965da04a23a00e2 (diff)
downloadbinaryen-662f31c721ede0c3c2f5a455e711f4467225a475.tar.gz
binaryen-662f31c721ede0c3c2f5a455e711f4467225a475.tar.bz2
binaryen-662f31c721ede0c3c2f5a455e711f4467225a475.zip
RemoveUnusedBrs: Optimize if-of-if pattern (#4180)
if (A) { if (B) { C } } => if (A ? B : 0) { C } when B has no side effects, and is fast enough to consider running unconditionally. In that case, we replace an if with a select and a zero, which is the same size, but should be faster and may be further optimized. As suggested in #4168
Diffstat (limited to 'src/passes/Precompute.cpp')
0 files changed, 0 insertions, 0 deletions