diff options
author | Alon Zakai <azakai@google.com> | 2020-05-27 09:18:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-27 09:18:36 -0700 |
commit | c7f18b7fb34e2464f7a7beb31d8c8363e8597902 (patch) | |
tree | 71e6a0a4d7659f08c1644c22103ec66be4bfdfaa /src/passes/pass.cpp | |
parent | 616463d1f33804f639d6c32ad284e7280a0a7b71 (diff) | |
download | binaryen-c7f18b7fb34e2464f7a7beb31d8c8363e8597902.tar.gz binaryen-c7f18b7fb34e2464f7a7beb31d8c8363e8597902.tar.bz2 binaryen-c7f18b7fb34e2464f7a7beb31d8c8363e8597902.zip |
DeNaN pass (#2877)
This moves the fuzzer de-NaN logic out into a separate pass. This is
cleaner and also better since the old way would de-NaN once, but then
the reducer could generate code with nans. The new way lets us de-NaN
while reducing.
Diffstat (limited to 'src/passes/pass.cpp')
-rw-r--r-- | src/passes/pass.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index 733b61467..4b023a46e 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -104,6 +104,9 @@ void PassRegistry::registerPasses() { createConstHoistingPass); registerPass( "dce", "removes unreachable code", createDeadCodeEliminationPass); + registerPass("denan", + "instrument the wasm to convert NaNs into 0 at runtime", + createDeNaNPass); registerPass( "directize", "turns indirect calls into direct ones", createDirectizePass); registerPass( |