diff options
author | Alon Zakai <azakai@google.com> | 2020-10-08 12:37:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-08 12:37:17 -0700 |
commit | b326a3e84de1125ea0cd11162eea822f7e7e927e (patch) | |
tree | 7130604c4f09ce5c82bf15bb308c63d7085326da /src/passes/OptimizeInstructions.cpp | |
parent | 6fbf158b04f6ba2771f4856e41d070086b5b0d96 (diff) | |
download | binaryen-b326a3e84de1125ea0cd11162eea822f7e7e927e.tar.gz binaryen-b326a3e84de1125ea0cd11162eea822f7e7e927e.tar.bz2 binaryen-b326a3e84de1125ea0cd11162eea822f7e7e927e.zip |
Remove old attempted DSL beginnings from OptimizeInstructions (#3200)
Wasm turned out to not be that good for a DSL for such peephole optimizations,
so that never made progress. Meanwhile we have the new matcher stuff which
works well.
Diffstat (limited to 'src/passes/OptimizeInstructions.cpp')
-rw-r--r-- | src/passes/OptimizeInstructions.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/passes/OptimizeInstructions.cpp b/src/passes/OptimizeInstructions.cpp index 59a38eeaa..85f777eb5 100644 --- a/src/passes/OptimizeInstructions.cpp +++ b/src/passes/OptimizeInstructions.cpp @@ -155,12 +155,6 @@ struct OptimizeInstructions Pass* create() override { return new OptimizeInstructions; } - void prepareToRun(PassRunner* runner, Module* module) override { -#if 0 - static DatabaseEnsurer ensurer; -#endif - } - bool fastMath; void doWalkFunction(Function* func) { @@ -185,24 +179,7 @@ struct OptimizeInstructions replaceCurrent(curr); continue; } -#if 0 - auto iter = database->patternMap.find(curr->_id); - if (iter == database->patternMap.end()) return; - auto& patterns = iter->second; - bool more = false; - for (auto& pattern : patterns) { - Match match(*getModule(), pattern); - if (match.check(curr)) { - curr = match.apply(); - replaceCurrent(curr); - more = true; - break; // exit pattern for loop, return to main while loop - } - } - if (!more) break; -#else break; -#endif } } |