summaryrefslogtreecommitdiff
path: root/src/binaryen-c.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-10-04 15:45:43 -0700
committerGitHub <noreply@github.com>2021-10-04 15:45:43 -0700
commit8895a2417d37e3444c98f0023e98ab9151d04290 (patch)
tree4b233b178e80f39a1177c26e093613fa932fbc25 /src/binaryen-c.cpp
parent972062c373e599a5f75d70fa0569e9d0b57854bf (diff)
downloadbinaryen-8895a2417d37e3444c98f0023e98ab9151d04290.tar.gz
binaryen-8895a2417d37e3444c98f0023e98ab9151d04290.tar.bz2
binaryen-8895a2417d37e3444c98f0023e98ab9151d04290.zip
Optimize call_indirect of a select of two constants (#4208)
(call_indirect ..args.. (select (i32.const x) (i32.const y) (condition) ) ) => (if (condition) (call $func-for-x ..args.. ) (call $func-for-y ..args.. ) ) To do this we must reorder the condition with the args, and also use the args more than once, so place them all in locals. This works towards the goal of polymorphic devirtualization, that is, turning an indirect call of more than one possible target into more than one direct call.
Diffstat (limited to 'src/binaryen-c.cpp')
0 files changed, 0 insertions, 0 deletions