summaryrefslogtreecommitdiff
path: root/src/passes/pass.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2019-12-09 15:27:25 -0800
committerGitHub <noreply@github.com>2019-12-09 15:27:25 -0800
commit247884e68b30dedeb01457d6c7e50d4bba5e4abc (patch)
tree0f493372db2029e895605a3d9761faa5863db8e0 /src/passes/pass.cpp
parent72bacfd46fb0ed4851c22344c3cc632e701ce022 (diff)
downloadbinaryen-247884e68b30dedeb01457d6c7e50d4bba5e4abc.tar.gz
binaryen-247884e68b30dedeb01457d6c7e50d4bba5e4abc.tar.bz2
binaryen-247884e68b30dedeb01457d6c7e50d4bba5e4abc.zip
Add a RoundTrip pass (#2516)
This pass writes and reads the module. This shows the effects of converting to and back from the binary format, and will be useful in testing dwarf debug support (where we'll need to see that writing and reading a module preserves debug info properly).
Diffstat (limited to 'src/passes/pass.cpp')
-rw-r--r--src/passes/pass.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp
index 4b3021764..5dd39a453 100644
--- a/src/passes/pass.cpp
+++ b/src/passes/pass.cpp
@@ -276,6 +276,9 @@ void PassRegistry::registerPasses() {
createReReloopPass);
registerPass(
"rse", "remove redundant local.sets", createRedundantSetEliminationPass);
+ registerPass("roundtrip",
+ "write the module to binary, then read it",
+ createRoundTripPass);
registerPass("safe-heap",
"instrument loads and stores to check for invalid behavior",
createSafeHeapPass);