diff options
author | Alon Zakai <alonzakai@gmail.com> | 2019-04-16 10:00:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-16 10:00:19 -0700 |
commit | 324238cc44e51c65637d29a938c435248d384154 (patch) | |
tree | fcd7a35442c720385ff5746a3de83a7123e04be8 /src/passes/LocalCSE.cpp | |
parent | cb2d63586c08a3dd194d2b733ceb3f5051c081f8 (diff) | |
download | binaryen-324238cc44e51c65637d29a938c435248d384154.tar.gz binaryen-324238cc44e51c65637d29a938c435248d384154.tar.bz2 binaryen-324238cc44e51c65637d29a938c435248d384154.zip |
Verify flat IR where it is expected, and give a nice error (#2009)
Fixes #2007 #2008
Diffstat (limited to 'src/passes/LocalCSE.cpp')
-rw-r--r-- | src/passes/LocalCSE.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/passes/LocalCSE.cpp b/src/passes/LocalCSE.cpp index 32cc97b34..1338c6571 100644 --- a/src/passes/LocalCSE.cpp +++ b/src/passes/LocalCSE.cpp @@ -41,9 +41,10 @@ #include <wasm-builder.h> #include <wasm-traversal.h> #include <pass.h> -#include <ir/effects.h> #include <ir/cost.h> +#include <ir/effects.h> #include <ir/equivalent_sets.h> +#include "ir/flat.h" #include <ir/hashed.h> namespace wasm { @@ -75,6 +76,7 @@ struct LocalCSE : public WalkerPass<LinearExecutionWalker<LocalCSE>> { bool anotherPass; void doWalkFunction(Function* func) { + Flat::verifyFlatness(func); anotherPass = true; // we may need multiple rounds while (anotherPass) { |