summaryrefslogtreecommitdiff
path: root/src/passes
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes')
-rw-r--r--src/passes/NameList.cpp2
-rw-r--r--src/passes/OnceReduction.cpp2
-rw-r--r--src/passes/PrintFeatures.cpp2
-rw-r--r--src/passes/ReorderFunctions.cpp2
4 files changed, 8 insertions, 0 deletions
diff --git a/src/passes/NameList.cpp b/src/passes/NameList.cpp
index 1051a31d1..a0078e263 100644
--- a/src/passes/NameList.cpp
+++ b/src/passes/NameList.cpp
@@ -26,6 +26,8 @@
namespace wasm {
struct NameList : public Pass {
+ bool modifiesBinaryenIR() override { return false; }
+
void run(PassRunner* runner, Module* module) override {
ModuleUtils::iterDefinedFunctions(*module, [&](Function* func) {
std::cout << " " << func->name << " : "
diff --git a/src/passes/OnceReduction.cpp b/src/passes/OnceReduction.cpp
index fd38aeafe..1eb76c29e 100644
--- a/src/passes/OnceReduction.cpp
+++ b/src/passes/OnceReduction.cpp
@@ -84,6 +84,8 @@ struct OptInfo {
struct Scanner : public WalkerPass<PostWalker<Scanner>> {
bool isFunctionParallel() override { return true; }
+ bool modifiesBinaryenIR() override { return false; }
+
Scanner(OptInfo& optInfo) : optInfo(optInfo) {}
Scanner* create() override { return new Scanner(optInfo); }
diff --git a/src/passes/PrintFeatures.cpp b/src/passes/PrintFeatures.cpp
index 53ef6676f..6b89e18d6 100644
--- a/src/passes/PrintFeatures.cpp
+++ b/src/passes/PrintFeatures.cpp
@@ -25,6 +25,8 @@
namespace wasm {
struct PrintFeatures : public Pass {
+ bool modifiesBinaryenIR() override { return false; }
+
void run(PassRunner* runner, Module* module) override {
module->features.iterFeatures([](FeatureSet::Feature f) {
std::cout << "--enable-" << FeatureSet::toString(f) << std::endl;
diff --git a/src/passes/ReorderFunctions.cpp b/src/passes/ReorderFunctions.cpp
index 326893951..7d2e7fb53 100644
--- a/src/passes/ReorderFunctions.cpp
+++ b/src/passes/ReorderFunctions.cpp
@@ -40,6 +40,8 @@ typedef std::unordered_map<Name, std::atomic<Index>> NameCountMap;
struct CallCountScanner : public WalkerPass<PostWalker<CallCountScanner>> {
bool isFunctionParallel() override { return true; }
+ bool modifiesBinaryenIR() override { return false; }
+
CallCountScanner(NameCountMap* counts) : counts(counts) {}
CallCountScanner* create() override { return new CallCountScanner(counts); }