You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently utilizing precompute to find out whether conditions to branches are constant by
creating a temporary function
using the expression of interest as its body
running the precompute pass on that function
evaluating the new body
removing the temporary function again.
This has downsides in regards to overhead and that we have to replace the expression instead of keeping it intact, leading to not-so-untouched output, and doesn't work if the expression has side-effects.
So I've been thinking about adding an API like BinaryenExpressionEvaluate to aid here, but since precompute is a pass with no header that isn't meant to be used this way, it seems to require substantial code changes that I'm unsure about. Any suggestions how to tackle this? :)
The text was updated successfully, but these errors were encountered:
This shouldn't be too difficult because the interpretation machinery in wasm-interpreter.h is already independent of any particular pass. I would look at how Precompute.cpp integrates the interpreter and do something similar in one of the utils headers, rather than trying to reuse Precompute itself.
We are currently utilizing precompute to find out whether conditions to branches are constant by
This has downsides in regards to overhead and that we have to replace the expression instead of keeping it intact, leading to not-so-untouched output, and doesn't work if the expression has side-effects.
So I've been thinking about adding an API like
BinaryenExpressionEvaluate
to aid here, but since precompute is a pass with no header that isn't meant to be used this way, it seems to require substantial code changes that I'm unsure about. Any suggestions how to tackle this? :)The text was updated successfully, but these errors were encountered: