From d09c607ff2f2c264546b7d4ea3593ae75a037750 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 31 Jul 2020 12:35:01 -0700 Subject: New Dealign pass: reduce load/store alignment to 1 (#3010) Pretty trivial, but will be useful in wasm2js testing, where we can't assume an incorrectly-aligned load/store will still work, so we'll need to be pessimistic about alignment there. --- src/passes/pass.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/passes/pass.cpp') diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index 14bf5d185..6dcc58b50 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("dealign", + "forces all loads and stores to have alignment 1", + createDeAlignPass); registerPass("denan", "instrument the wasm to convert NaNs into 0 at runtime", createDeNaNPass); -- cgit v1.2.3