diff options
-rw-r--r-- | src/passes/pass.cpp | 18 | ||||
-rw-r--r-- | test/lit/passes/O1_skip.wast | 5 |
2 files changed, 15 insertions, 8 deletions
diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index 593023c7c..13d700af9 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -816,13 +816,17 @@ void PassRunner::run() { flush(); } - // All the passes the user requested to skip should have been seen, and - // skipped. If not, the user may have had a typo in the name of a pass to - // skip, and we will warn. - for (auto pass : options.passesToSkip) { - if (!skippedPasses.count(pass)) { - std::cerr << "warning: --" << pass << " was requested to be skipped, " - << "but it was not found in the passes that were run.\n"; + if (!isNested) { + // All the passes the user requested to skip should have been seen, and + // skipped. If not, the user may have had a typo in the name of a pass to + // skip, and we will warn. (We don't do this in a nested runner because + // those are used for various internal tasks inside passes, which would lead + // to many spurious warnings.) + for (auto pass : options.passesToSkip) { + if (!skippedPasses.count(pass)) { + std::cerr << "warning: --" << pass << " was requested to be skipped, " + << "but it was not found in the passes that were run.\n"; + } } } } diff --git a/test/lit/passes/O1_skip.wast b/test/lit/passes/O1_skip.wast index c57d052b4..ebbf9df4a 100644 --- a/test/lit/passes/O1_skip.wast +++ b/test/lit/passes/O1_skip.wast @@ -1,11 +1,14 @@ ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. ;; NOTE: This test was ported using port_passes_tests_to_lit.py and could be cleaned up. -;; RUN: foreach %s %t wasm-opt -O2 --coalesce-locals --skip-pass=coalesce-locals -S -o - | filecheck %s +;; RUN: foreach %s %t wasm-opt -O2 --coalesce-locals --skip-pass=coalesce-locals -S -o - 2>&1 | filecheck %s ;; We should skip coalese-locals even though it is run in -O2 and also we ask to ;; run it directly: the skip instruction overrides everything else. +;; There should also be no warning in the output. +;; CHECK-NOT: warning: + (module ;; CHECK: (type $i32_i32_=>_none (func (param i32 i32))) |