diff options
author | Alon Zakai <azakai@google.com> | 2020-11-15 14:43:32 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-15 14:43:32 -0800 |
commit | 59a74f9bfc83bd1cf67208bb41ecb3f9bda492e6 (patch) | |
tree | 730db8c1ea68e2cbfbff046fd1dbc49fd186c121 | |
parent | 6f433967372455aff90a6e0f03a72c403d77fd12 (diff) | |
download | binaryen-59a74f9bfc83bd1cf67208bb41ecb3f9bda492e6.tar.gz binaryen-59a74f9bfc83bd1cf67208bb41ecb3f9bda492e6.tar.bz2 binaryen-59a74f9bfc83bd1cf67208bb41ecb3f9bda492e6.zip |
Minor code cleanups. NFC (#3364)
The vacuum code can be deleted as it is handled by the default anyhow.
-rw-r--r-- | src/passes/OptimizeInstructions.cpp | 2 | ||||
-rw-r--r-- | src/passes/Vacuum.cpp | 14 |
2 files changed, 1 insertions, 15 deletions
diff --git a/src/passes/OptimizeInstructions.cpp b/src/passes/OptimizeInstructions.cpp index 019d6bda1..56c99984a 100644 --- a/src/passes/OptimizeInstructions.cpp +++ b/src/passes/OptimizeInstructions.cpp @@ -19,6 +19,7 @@ // #include <algorithm> +#include <cmath> #include <type_traits> #include <ir/abstract.h> @@ -33,7 +34,6 @@ #include <ir/utils.h> #include <pass.h> #include <support/threads.h> -#include <wasm-s-parser.h> #include <wasm.h> // TODO: Use the new sign-extension opcodes where appropriate. This needs to be diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index 618a198e5..fcfa944de 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -83,20 +83,6 @@ struct Vacuum : public WalkerPass<ExpressionStackWalker<Vacuum>> { case Expression::Id::TryId: return curr; // not always needed, but handled in visitTry() - case Expression::Id::BreakId: - case Expression::Id::SwitchId: - case Expression::Id::BrOnExnId: - case Expression::Id::CallId: - case Expression::Id::CallIndirectId: - case Expression::Id::LocalSetId: - case Expression::Id::StoreId: - case Expression::Id::ReturnId: - case Expression::Id::GlobalSetId: - case Expression::Id::MemorySizeId: - case Expression::Id::MemoryGrowId: - case Expression::Id::UnreachableId: - return curr; // always needed - case Expression::Id::LoadId: { // it is ok to remove a load if the result is not used, and it has no // side effects (the load itself may trap, if we are not ignoring such |