summaryrefslogtreecommitdiff
path: root/src/passes/DataFlowOpts.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-04-16 10:00:19 -0700
committerGitHub <noreply@github.com>2019-04-16 10:00:19 -0700
commit324238cc44e51c65637d29a938c435248d384154 (patch)
treefcd7a35442c720385ff5746a3de83a7123e04be8 /src/passes/DataFlowOpts.cpp
parentcb2d63586c08a3dd194d2b733ceb3f5051c081f8 (diff)
downloadbinaryen-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/DataFlowOpts.cpp')
-rw-r--r--src/passes/DataFlowOpts.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/passes/DataFlowOpts.cpp b/src/passes/DataFlowOpts.cpp
index 702b3e7f4..42f01673f 100644
--- a/src/passes/DataFlowOpts.cpp
+++ b/src/passes/DataFlowOpts.cpp
@@ -27,6 +27,7 @@
#include "wasm.h"
#include "pass.h"
#include "wasm-builder.h"
+#include "ir/flat.h"
#include "ir/utils.h"
#include "dataflow/node.h"
#include "dataflow/graph.h"
@@ -48,6 +49,7 @@ struct DataFlowOpts : public WalkerPass<PostWalker<DataFlowOpts>> {
DataFlow::Graph graph;
void doWalkFunction(Function* func) {
+ Flat::verifyFlatness(func);
// Build the data-flow IR.
graph.build(func, getModule());
nodeUsers.build(graph);