From cdfda07b3935ff22eb309cccbb53ea302d06f931 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 28 Aug 2026 12:01:50 -0700 Subject: [PATCH 01/52] Do not emit trailing whitespace on blank lines (#9052) - In printWrap, avoid printing trailing spaces before newlines and on empty lines. - Remove whitespace indentation before closing parentheses on raw string literal tool descriptions in wasm-opt and wasm-reduce. - In printStackIR, skip Pop pseudo-instructions before emitting indentation so that they do not produce empty lines with indentation. The version of filecheck we currently use handles whitespace-only lines fine, but LLVM FileCheck and newer versions of Python filecheck require explicit `{{^ +$}}` regex matchers for such lines. It's nicer to just not emit whitespace-only lines in the first place if we want to upgrade our version of filecheck. --- src/passes/Print.cpp | 4 ++-- src/support/command-line.cpp | 18 +++++++++++------- src/tools/wasm-opt.cpp | 2 +- src/tools/wasm-reduce/wasm-reduce.cpp | 2 +- test/lit/passes/stack-ir-eh-legacy.wast | 1 - 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 50600001e9a..a6c40b81100 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -3884,13 +3884,13 @@ static std::ostream& printStackIR(StackIR* ir, PrintSExpression& printer) { } switch (inst->op) { case StackInst::Basic: { - doIndent(); // Pop is a pseudo instruction and should not be printed in the stack IR // format to make it valid wat form. if (inst->origin->is()) { - break; + continue; } + doIndent(); PrintExpressionContents(printer).visit(inst->origin); break; } diff --git a/src/support/command-line.cpp b/src/support/command-line.cpp index 30db3f4377d..83ef17dbfa3 100644 --- a/src/support/command-line.cpp +++ b/src/support/command-line.cpp @@ -48,14 +48,18 @@ void printWrap(std::ostream& os, int leftPad, const std::string& content) { space = SCREEN_WIDTH - leftPad; } os << nextWord; - space -= nextWord.size() + 1; - if (space > 0) { - os << ' '; - } + space -= nextWord.size(); nextWord.clear(); - if (content[i] == '\n') { - os << '\n'; - space = SCREEN_WIDTH - leftPad; + if (i < len) { + if (content[i] == ' ') { + if (space > 0) { + os << ' '; + space -= 1; + } + } else if (content[i] == '\n') { + os << '\n'; + space = SCREEN_WIDTH - leftPad; + } } } } diff --git a/src/tools/wasm-opt.cpp b/src/tools/wasm-opt.cpp index 94d72181cac..f5e010fcb2f 100644 --- a/src/tools/wasm-opt.cpp +++ b/src/tools/wasm-opt.cpp @@ -110,7 +110,7 @@ For more on how to optimize effectively, see https://github.com/WebAssembly/binaryen/wiki/Optimizer-Cookbook https://github.com/WebAssembly/binaryen/wiki/GC-Optimization-Guidebook - )"); +)"); options .add("--output", diff --git a/src/tools/wasm-reduce/wasm-reduce.cpp b/src/tools/wasm-reduce/wasm-reduce.cpp index 42eb113bd34..3b53aadca60 100644 --- a/src/tools/wasm-reduce/wasm-reduce.cpp +++ b/src/tools/wasm-reduce/wasm-reduce.cpp @@ -1396,7 +1396,7 @@ Comparison to creduce: More documentation can be found at https://github.com/WebAssembly/binaryen/wiki/Fuzzing#reducing - )"); +)"); options .add("--command", "-cmd", diff --git a/test/lit/passes/stack-ir-eh-legacy.wast b/test/lit/passes/stack-ir-eh-legacy.wast index 14e53a33a98..a8b30987538 100644 --- a/test/lit/passes/stack-ir-eh-legacy.wast +++ b/test/lit/passes/stack-ir-eh-legacy.wast @@ -11,7 +11,6 @@ ;; CHECK-NEXT: i32.const 0 ;; CHECK-NEXT: throw $e0 ;; CHECK-NEXT: catch $e0 - ;; CHECK-NEXT: ;; CHECK-NEXT: drop ;; CHECK-NEXT: catch_all ;; CHECK-NEXT: rethrow $l0 From a30696f95e3834be039dc3a0d8b6052c28d4c0a6 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 28 Aug 2026 12:01:51 -0700 Subject: [PATCH 02/52] Emit CHECK-EMPTY directives in test update scripts (#9053) - Update update_lit_checks.py and update_help_checks.py to emit CHECK-EMPTY: for blank lines instead of empty CHECK: / CHECK-NEXT:. - Update check_line_re in update_lit_checks.py to recognize all standard FileCheck suffixes. - Regenerate help tests and manual tests with CHECK-EMPTY:. --- scripts/update_help_checks.py | 8 +- scripts/update_lit_checks.py | 12 +- test/lit/fuzz-types.test | 4 +- test/lit/help/wasm-as.test | 226 ++-- test/lit/help/wasm-ctor-eval.test | 236 ++-- test/lit/help/wasm-dis.test | 220 ++-- test/lit/help/wasm-emscripten-finalize.test | 274 ++--- test/lit/help/wasm-fuzz-types.test | 22 +- test/lit/help/wasm-merge.test | 266 ++--- test/lit/help/wasm-metadce.test | 1080 ++++++++--------- test/lit/help/wasm-opt.test | 1146 +++++++++---------- test/lit/help/wasm-reduce.test | 296 ++--- test/lit/help/wasm-shell.test | 14 +- test/lit/help/wasm-split.test | 414 +++---- test/lit/help/wasm2js.test | 1068 ++++++++--------- test/lit/merge/manifest-explicit-name.wat | 2 +- test/lit/merge/manifest.wat | 2 +- 17 files changed, 2649 insertions(+), 2641 deletions(-) diff --git a/scripts/update_help_checks.py b/scripts/update_help_checks.py index 5471f3533a9..e7e3e0deb21 100755 --- a/scripts/update_help_checks.py +++ b/scripts/update_help_checks.py @@ -39,11 +39,13 @@ def main(): out.write(f';; RUN: {tool} --help | filecheck %s' + os.linesep) first = True for line in output.splitlines(): - if first: - out.write(f';; CHECK: {line}'.strip() + os.linesep) + if not line: + out.write(';; CHECK-EMPTY:' + os.linesep) + elif first: + out.write(f';; CHECK: {line}' + os.linesep) first = False else: - out.write(f';; CHECK-NEXT: {line}'.strip() + os.linesep) + out.write(f';; CHECK-NEXT: {line}' + os.linesep) if __name__ == '__main__': diff --git a/scripts/update_lit_checks.py b/scripts/update_lit_checks.py index d399fae8493..1519ca00e73 100755 --- a/scripts/update_lit_checks.py +++ b/scripts/update_lit_checks.py @@ -331,7 +331,7 @@ def update_test(args, test, lines, tmp): prefixes = {prefix for module_output in command_output for prefix in module_output.keys()} check_line_re = re.compile(r'^\s*;;\s*(' + '|'.join(prefixes) + - r')(?:-NEXT|-LABEL|-NOT)?:.*$') + r')(?:-[A-Z0-9]+)?:.*$') # Filter out whitespace between check blocks if lines: @@ -353,8 +353,14 @@ def update_test(args, test, lines, tmp): def emit_checks(indent, prefix, lines): def pad(line): return line if not line or line.startswith(' ') else ' ' + line - output_lines.append(f'{indent};; {prefix}: {pad(lines[0])}') - output_lines.extend(f'{indent};; {prefix}-NEXT:{pad(line)}' for line in lines[1:]) + + for i, line in enumerate(lines): + if not line.strip(): + output_lines.append(f'{indent};; {prefix}-EMPTY:') + elif i == 0: + output_lines.append(f'{indent};; {prefix}: {pad(line)}') + else: + output_lines.append(f'{indent};; {prefix}-NEXT:{pad(line)}') input_modules = [m.split('\n') for m in split_modules('\n'.join(lines))] if len(input_modules) > len(command_output): diff --git a/test/lit/fuzz-types.test b/test/lit/fuzz-types.test index 9d39339af56..1635dcb500e 100644 --- a/test/lit/fuzz-types.test +++ b/test/lit/fuzz-types.test @@ -28,9 +28,9 @@ ;; CHECK-NEXT: (type $18 (sub final $13 (describes $17) (struct (field (ref noextern)) (field (ref $10)) (field (mut i32)) (field (mut i16)) (field (mut (ref null $1))) (field i8)))) ;; CHECK-NEXT: (type $19 (sub $8 (struct (field i32) (field (mut i8))))) ;; CHECK-NEXT: ) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Inhabitable types: -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Built 20 types: ;; CHECK-NEXT: (rec ;; CHECK-NEXT: (type $0 (sub (shared (func (param i64 f64 exnref (ref null $0)) (result (ref cont)))))) diff --git a/test/lit/help/wasm-as.test b/test/lit/help/wasm-as.test index 5d27116d61d..e0948f13a4c 100644 --- a/test/lit/help/wasm-as.test +++ b/test/lit/help/wasm-as.test @@ -1,207 +1,207 @@ ;; RUN: wasm-as --help | filecheck %s ;; CHECK: ================================================================================ ;; CHECK-NEXT: wasm-as INFILE -;; CHECK-NEXT: -;; CHECK-NEXT: Assemble a .wat (WebAssembly text format) into a .wasm (WebAssembly binary +;; CHECK-EMPTY: +;; CHECK-NEXT: Assemble a .wat (WebAssembly text format) into a .wasm (WebAssembly binary ;; CHECK-NEXT: format) ;; CHECK-NEXT: ================================================================================ -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-as options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output,-o Output file -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --validate,-v Control validation of the output module -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debuginfo,-g Emit names section and debug info -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --source-map,-sm Emit source map to the specified file -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --source-map-url,-su Use specified string as source map URL -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --symbolmap,-s Emit a symbol map (indexes => names) -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Tool options: ;; CHECK-NEXT: ------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --mvp-features,-mvp Disable all non-MVP features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --all-features,-all Enable all features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --detect-features (deprecated - this flag does nothing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --quiet,-q Emit less verbose output and hide trivial ;; CHECK-NEXT: warnings. -;; CHECK-NEXT: -;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing +;; CHECK-EMPTY: +;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing ;; CHECK-NEXT: purposes. -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting ;; CHECK-NEXT: the rest of the names section. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-sign-ext Enable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-sign-ext Disable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-threads Enable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-threads Disable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-mutable-globals Enable mutable globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-mutable-globals Disable mutable globals -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-simd Enable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-simd Disable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory Enable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory Disable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and memory.fill -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-exception-handling Enable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-exception-handling Disable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-tail-call Enable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-tail-call Disable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-reference-types Enable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-reference-types Disable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multivalue Enable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multivalue Disable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-gc Enable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-gc Disable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-memory64 Enable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-memory64 Disable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-simd Enable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-extended-const Enable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-extended-const Disable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-strings Enable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-strings Disable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multimemory Enable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multimemory Disable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-stack-switching Enable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-stack-switching Disable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-shared-everything Enable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-fp16 Enable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-fp16 Disable float 16 operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multibyte Enable multibyte array loads and stores -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads and stores -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-page-sizes Enable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-custom-page-sizes Disable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-wide-arithmetic Enable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-wide-arithmetic Disable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-compact-imports Enable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-compact-imports Disable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: -;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are ;; CHECK-NEXT: correct -;; CHECK-NEXT: -;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization -;; CHECK-NEXT: passes being run. Must be in the form -;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass -;; CHECK-NEXT: then it applies to the closest instance +;; CHECK-EMPTY: +;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization +;; CHECK-NEXT: passes being run. Must be in the form +;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass +;; CHECK-NEXT: then it applies to the closest instance ;; CHECK-NEXT: of that pass before us. If KEY is not the ;; CHECK-NEXT: name of a pass then it is a global option -;; CHECK-NEXT: that applies to all pass instances that +;; CHECK-NEXT: that applies to all pass instances that ;; CHECK-NEXT: read it. -;; CHECK-NEXT: -;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does -;; CHECK-NEXT: not inspect or interact with GC and -;; CHECK-NEXT: function references, even if they are -;; CHECK-NEXT: passed out. The outside may hold on to -;; CHECK-NEXT: them and pass them back in, but not +;; CHECK-EMPTY: +;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does +;; CHECK-NEXT: not inspect or interact with GC and +;; CHECK-NEXT: function references, even if they are +;; CHECK-NEXT: passed out. The outside may hold on to +;; CHECK-NEXT: them and pass them back in, but not ;; CHECK-NEXT: inspect their contents or call them. -;; CHECK-NEXT: -;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the +;; CHECK-EMPTY: +;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the ;; CHECK-NEXT: input (useful for debugging and testing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --generate-stack-ir generate StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-stack-ir optimize StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-stack-ir print StackIR during writing -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: General options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --version Output version information and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debug,-d Print debug information to stderr -;; CHECK-NEXT: +;; CHECK-EMPTY: diff --git a/test/lit/help/wasm-ctor-eval.test b/test/lit/help/wasm-ctor-eval.test index 59106345216..14cc82d65e1 100644 --- a/test/lit/help/wasm-ctor-eval.test +++ b/test/lit/help/wasm-ctor-eval.test @@ -1,214 +1,214 @@ ;; RUN: wasm-ctor-eval --help | filecheck %s ;; CHECK: ================================================================================ ;; CHECK-NEXT: wasm-ctor-eval INFILE -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Execute code at compile time ;; CHECK-NEXT: ================================================================================ -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-ctor-eval options: ;; CHECK-NEXT: ----------------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output,-o Output file -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for the +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for the ;; CHECK-NEXT: output file -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debuginfo,-g Emit names section and debug info -;; CHECK-NEXT: -;; CHECK-NEXT: --ctors,-c Comma-separated list of global +;; CHECK-EMPTY: +;; CHECK-NEXT: --ctors,-c Comma-separated list of global ;; CHECK-NEXT: constructor functions to evaluate -;; CHECK-NEXT: -;; CHECK-NEXT: --kept-exports,-ke Comma-separated list of ctors whose -;; CHECK-NEXT: exports we keep around even if we eval +;; CHECK-EMPTY: +;; CHECK-NEXT: --kept-exports,-ke Comma-separated list of ctors whose +;; CHECK-NEXT: exports we keep around even if we eval ;; CHECK-NEXT: those ctors -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --ignore-external-input,-ipi Assumes no env vars are to be read, stdin ;; CHECK-NEXT: is empty, etc. -;; CHECK-NEXT: -;; CHECK-NEXT: --quiet,-q Do not emit verbose logging about the +;; CHECK-EMPTY: +;; CHECK-NEXT: --quiet,-q Do not emit verbose logging about the ;; CHECK-NEXT: eval process -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Tool options: ;; CHECK-NEXT: ------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --mvp-features,-mvp Disable all non-MVP features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --all-features,-all Enable all features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --detect-features (deprecated - this flag does nothing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --quiet,-q Emit less verbose output and hide trivial ;; CHECK-NEXT: warnings. -;; CHECK-NEXT: -;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing +;; CHECK-EMPTY: +;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing ;; CHECK-NEXT: purposes. -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting ;; CHECK-NEXT: the rest of the names section. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-sign-ext Enable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-sign-ext Disable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-threads Enable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-threads Disable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-mutable-globals Enable mutable globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-mutable-globals Disable mutable globals -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-simd Enable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-simd Disable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory Enable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory Disable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and memory.fill -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-exception-handling Enable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-exception-handling Disable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-tail-call Enable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-tail-call Disable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-reference-types Enable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-reference-types Disable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multivalue Enable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multivalue Disable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-gc Enable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-gc Disable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-memory64 Enable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-memory64 Disable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-simd Enable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-extended-const Enable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-extended-const Disable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-strings Enable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-strings Disable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multimemory Enable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multimemory Disable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-stack-switching Enable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-stack-switching Disable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-shared-everything Enable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-fp16 Enable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-fp16 Disable float 16 operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multibyte Enable multibyte array loads and stores -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads and stores -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-page-sizes Enable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-custom-page-sizes Disable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-wide-arithmetic Enable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-wide-arithmetic Disable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-compact-imports Enable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-compact-imports Disable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: -;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are ;; CHECK-NEXT: correct -;; CHECK-NEXT: -;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization -;; CHECK-NEXT: passes being run. Must be in the form -;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass -;; CHECK-NEXT: then it applies to the closest instance +;; CHECK-EMPTY: +;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization +;; CHECK-NEXT: passes being run. Must be in the form +;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass +;; CHECK-NEXT: then it applies to the closest instance ;; CHECK-NEXT: of that pass before us. If KEY is not the ;; CHECK-NEXT: name of a pass then it is a global option -;; CHECK-NEXT: that applies to all pass instances that +;; CHECK-NEXT: that applies to all pass instances that ;; CHECK-NEXT: read it. -;; CHECK-NEXT: -;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does -;; CHECK-NEXT: not inspect or interact with GC and -;; CHECK-NEXT: function references, even if they are -;; CHECK-NEXT: passed out. The outside may hold on to -;; CHECK-NEXT: them and pass them back in, but not +;; CHECK-EMPTY: +;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does +;; CHECK-NEXT: not inspect or interact with GC and +;; CHECK-NEXT: function references, even if they are +;; CHECK-NEXT: passed out. The outside may hold on to +;; CHECK-NEXT: them and pass them back in, but not ;; CHECK-NEXT: inspect their contents or call them. -;; CHECK-NEXT: -;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the +;; CHECK-EMPTY: +;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the ;; CHECK-NEXT: input (useful for debugging and testing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --generate-stack-ir generate StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-stack-ir optimize StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-stack-ir print StackIR during writing -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: General options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --version Output version information and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debug,-d Print debug information to stderr -;; CHECK-NEXT: +;; CHECK-EMPTY: diff --git a/test/lit/help/wasm-dis.test b/test/lit/help/wasm-dis.test index 0f1c7935d85..552286b0128 100644 --- a/test/lit/help/wasm-dis.test +++ b/test/lit/help/wasm-dis.test @@ -1,200 +1,200 @@ ;; RUN: wasm-dis --help | filecheck %s ;; CHECK: ================================================================================ ;; CHECK-NEXT: wasm-dis INFILE -;; CHECK-NEXT: -;; CHECK-NEXT: Un-assemble a .wasm (WebAssembly binary format) into a .wat (WebAssembly text +;; CHECK-EMPTY: +;; CHECK-NEXT: Un-assemble a .wasm (WebAssembly binary format) into a .wat (WebAssembly text ;; CHECK-NEXT: format) ;; CHECK-NEXT: ================================================================================ -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-dis options: ;; CHECK-NEXT: ----------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output,-o Output file (stdout if not specified) -;; CHECK-NEXT: -;; CHECK-NEXT: --source-map,-sm Consume source map from the specified +;; CHECK-EMPTY: +;; CHECK-NEXT: --source-map,-sm Consume source map from the specified ;; CHECK-NEXT: file to add location information -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Tool options: ;; CHECK-NEXT: ------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --mvp-features,-mvp Disable all non-MVP features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --all-features,-all Enable all features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --detect-features (deprecated - this flag does nothing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --quiet,-q Emit less verbose output and hide trivial ;; CHECK-NEXT: warnings. -;; CHECK-NEXT: -;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing +;; CHECK-EMPTY: +;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing ;; CHECK-NEXT: purposes. -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting ;; CHECK-NEXT: the rest of the names section. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-sign-ext Enable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-sign-ext Disable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-threads Enable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-threads Disable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-mutable-globals Enable mutable globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-mutable-globals Disable mutable globals -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-simd Enable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-simd Disable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory Enable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory Disable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and memory.fill -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-exception-handling Enable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-exception-handling Disable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-tail-call Enable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-tail-call Disable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-reference-types Enable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-reference-types Disable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multivalue Enable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multivalue Disable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-gc Enable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-gc Disable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-memory64 Enable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-memory64 Disable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-simd Enable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-extended-const Enable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-extended-const Disable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-strings Enable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-strings Disable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multimemory Enable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multimemory Disable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-stack-switching Enable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-stack-switching Disable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-shared-everything Enable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-fp16 Enable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-fp16 Disable float 16 operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multibyte Enable multibyte array loads and stores -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads and stores -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-page-sizes Enable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-custom-page-sizes Disable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-wide-arithmetic Enable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-wide-arithmetic Disable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-compact-imports Enable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-compact-imports Disable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: -;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are ;; CHECK-NEXT: correct -;; CHECK-NEXT: -;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization -;; CHECK-NEXT: passes being run. Must be in the form -;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass -;; CHECK-NEXT: then it applies to the closest instance +;; CHECK-EMPTY: +;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization +;; CHECK-NEXT: passes being run. Must be in the form +;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass +;; CHECK-NEXT: then it applies to the closest instance ;; CHECK-NEXT: of that pass before us. If KEY is not the ;; CHECK-NEXT: name of a pass then it is a global option -;; CHECK-NEXT: that applies to all pass instances that +;; CHECK-NEXT: that applies to all pass instances that ;; CHECK-NEXT: read it. -;; CHECK-NEXT: -;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does -;; CHECK-NEXT: not inspect or interact with GC and -;; CHECK-NEXT: function references, even if they are -;; CHECK-NEXT: passed out. The outside may hold on to -;; CHECK-NEXT: them and pass them back in, but not +;; CHECK-EMPTY: +;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does +;; CHECK-NEXT: not inspect or interact with GC and +;; CHECK-NEXT: function references, even if they are +;; CHECK-NEXT: passed out. The outside may hold on to +;; CHECK-NEXT: them and pass them back in, but not ;; CHECK-NEXT: inspect their contents or call them. -;; CHECK-NEXT: -;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the +;; CHECK-EMPTY: +;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the ;; CHECK-NEXT: input (useful for debugging and testing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --generate-stack-ir generate StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-stack-ir optimize StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-stack-ir print StackIR during writing -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: General options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --version Output version information and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debug,-d Print debug information to stderr -;; CHECK-NEXT: +;; CHECK-EMPTY: diff --git a/test/lit/help/wasm-emscripten-finalize.test b/test/lit/help/wasm-emscripten-finalize.test index d1241b49ced..b3a852124e2 100644 --- a/test/lit/help/wasm-emscripten-finalize.test +++ b/test/lit/help/wasm-emscripten-finalize.test @@ -1,238 +1,238 @@ ;; RUN: wasm-emscripten-finalize --help | filecheck %s ;; CHECK: ================================================================================ ;; CHECK-NEXT: wasm-emscripten-finalize INFILE -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Performs Emscripten-specific transforms on .wasm files ;; CHECK-NEXT: ================================================================================ -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-emscripten-finalize options: ;; CHECK-NEXT: --------------------------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output,-o Output file -;; CHECK-NEXT: -;; CHECK-NEXT: --debuginfo,-g Emit names section in wasm binary (or +;; CHECK-EMPTY: +;; CHECK-NEXT: --debuginfo,-g Emit names section in wasm binary (or ;; CHECK-NEXT: full debuginfo in wast) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dwarf Update DWARF debug info -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for the -;; CHECK-NEXT: output file. In this mode if no output +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for the +;; CHECK-NEXT: output file. In this mode if no output ;; CHECK-NEXT: file is specified, we write to stdout. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --side-module Input is an emscripten side module -;; CHECK-NEXT: -;; CHECK-NEXT: --input-source-map,-ism Consume source map from the specified +;; CHECK-EMPTY: +;; CHECK-NEXT: --input-source-map,-ism Consume source map from the specified ;; CHECK-NEXT: file -;; CHECK-NEXT: -;; CHECK-NEXT: --bigint,-bi Assume JS will use wasm/JS BigInt -;; CHECK-NEXT: integration, so wasm i64s will turn into -;; CHECK-NEXT: JS BigInts, and there is no need for any -;; CHECK-NEXT: legalization at all (not even minimal +;; CHECK-EMPTY: +;; CHECK-NEXT: --bigint,-bi Assume JS will use wasm/JS BigInt +;; CHECK-NEXT: integration, so wasm i64s will turn into +;; CHECK-NEXT: JS BigInts, and there is no need for any +;; CHECK-NEXT: legalization at all (not even minimal ;; CHECK-NEXT: legalization of dynCalls) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output-source-map,-osm Emit source map to the specified file -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output-source-map-url,-osu Emit specified string as source map URL -;; CHECK-NEXT: -;; CHECK-NEXT: --check-stack-overflow Check for stack overflows every time the +;; CHECK-EMPTY: +;; CHECK-NEXT: --check-stack-overflow Check for stack overflows every time the ;; CHECK-NEXT: stack is extended -;; CHECK-NEXT: -;; CHECK-NEXT: --standalone-wasm Emit a wasm file that does not depend on -;; CHECK-NEXT: JS, as much as possible, using wasi and -;; CHECK-NEXT: other standard conventions etc. where +;; CHECK-EMPTY: +;; CHECK-NEXT: --standalone-wasm Emit a wasm file that does not depend on +;; CHECK-NEXT: JS, as much as possible, using wasi and +;; CHECK-NEXT: other standard conventions etc. where ;; CHECK-NEXT: possible -;; CHECK-NEXT: -;; CHECK-NEXT: --minimize-wasm-changes Modify the wasm as little as possible. -;; CHECK-NEXT: This is useful during development as we +;; CHECK-EMPTY: +;; CHECK-NEXT: --minimize-wasm-changes Modify the wasm as little as possible. +;; CHECK-NEXT: This is useful during development as we ;; CHECK-NEXT: reduce the number of changes to the wasm, -;; CHECK-NEXT: as it lets emscripten control how much +;; CHECK-NEXT: as it lets emscripten control how much ;; CHECK-NEXT: modifications to do. -;; CHECK-NEXT: -;; CHECK-NEXT: --no-dyncalls -;; CHECK-NEXT: -;; CHECK-NEXT: --dyncalls-i64 -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-dyncalls +;; CHECK-EMPTY: +;; CHECK-NEXT: --dyncalls-i64 +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Tool options: ;; CHECK-NEXT: ------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --mvp-features,-mvp Disable all non-MVP features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --all-features,-all Enable all features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --detect-features (deprecated - this flag does nothing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --quiet,-q Emit less verbose output and hide trivial ;; CHECK-NEXT: warnings. -;; CHECK-NEXT: -;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing +;; CHECK-EMPTY: +;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing ;; CHECK-NEXT: purposes. -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting ;; CHECK-NEXT: the rest of the names section. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-sign-ext Enable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-sign-ext Disable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-threads Enable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-threads Disable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-mutable-globals Enable mutable globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-mutable-globals Disable mutable globals -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-simd Enable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-simd Disable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory Enable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory Disable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and memory.fill -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-exception-handling Enable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-exception-handling Disable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-tail-call Enable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-tail-call Disable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-reference-types Enable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-reference-types Disable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multivalue Enable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multivalue Disable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-gc Enable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-gc Disable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-memory64 Enable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-memory64 Disable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-simd Enable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-extended-const Enable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-extended-const Disable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-strings Enable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-strings Disable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multimemory Enable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multimemory Disable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-stack-switching Enable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-stack-switching Disable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-shared-everything Enable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-fp16 Enable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-fp16 Disable float 16 operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multibyte Enable multibyte array loads and stores -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads and stores -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-page-sizes Enable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-custom-page-sizes Disable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-wide-arithmetic Enable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-wide-arithmetic Disable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-compact-imports Enable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-compact-imports Disable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: -;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are ;; CHECK-NEXT: correct -;; CHECK-NEXT: -;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization -;; CHECK-NEXT: passes being run. Must be in the form -;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass -;; CHECK-NEXT: then it applies to the closest instance +;; CHECK-EMPTY: +;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization +;; CHECK-NEXT: passes being run. Must be in the form +;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass +;; CHECK-NEXT: then it applies to the closest instance ;; CHECK-NEXT: of that pass before us. If KEY is not the ;; CHECK-NEXT: name of a pass then it is a global option -;; CHECK-NEXT: that applies to all pass instances that +;; CHECK-NEXT: that applies to all pass instances that ;; CHECK-NEXT: read it. -;; CHECK-NEXT: -;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does -;; CHECK-NEXT: not inspect or interact with GC and -;; CHECK-NEXT: function references, even if they are -;; CHECK-NEXT: passed out. The outside may hold on to -;; CHECK-NEXT: them and pass them back in, but not +;; CHECK-EMPTY: +;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does +;; CHECK-NEXT: not inspect or interact with GC and +;; CHECK-NEXT: function references, even if they are +;; CHECK-NEXT: passed out. The outside may hold on to +;; CHECK-NEXT: them and pass them back in, but not ;; CHECK-NEXT: inspect their contents or call them. -;; CHECK-NEXT: -;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the +;; CHECK-EMPTY: +;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the ;; CHECK-NEXT: input (useful for debugging and testing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --generate-stack-ir generate StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-stack-ir optimize StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-stack-ir print StackIR during writing -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: General options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --version Output version information and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debug,-d Print debug information to stderr -;; CHECK-NEXT: +;; CHECK-EMPTY: diff --git a/test/lit/help/wasm-fuzz-types.test b/test/lit/help/wasm-fuzz-types.test index 5bd5974fd3c..be2ac60f024 100644 --- a/test/lit/help/wasm-fuzz-types.test +++ b/test/lit/help/wasm-fuzz-types.test @@ -1,25 +1,25 @@ ;; RUN: wasm-fuzz-types --help | filecheck %s ;; CHECK: ================================================================================ ;; CHECK-NEXT: wasm-fuzz-types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Fuzz type construction, canonicalization, and operations ;; CHECK-NEXT: ================================================================================ -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-fuzz-types options: ;; CHECK-NEXT: ------------------------ -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --seed Run a single workload generated by the given seed -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --verbose,-v Print extra information -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: General options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --version Output version information and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debug,-d Print debug information to stderr -;; CHECK-NEXT: +;; CHECK-EMPTY: diff --git a/test/lit/help/wasm-merge.test b/test/lit/help/wasm-merge.test index c68d11f7324..f25743a8062 100644 --- a/test/lit/help/wasm-merge.test +++ b/test/lit/help/wasm-merge.test @@ -1,237 +1,237 @@ ;; RUN: wasm-merge --help | filecheck %s ;; CHECK: ================================================================================ ;; CHECK-NEXT: wasm-merge INFILE1 NAME1 INFILE2 NAME2 [..] -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Merge wasm files into one. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: For example, -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-merge foo.wasm foo bar.wasm bar -o merged.wasm -;; CHECK-NEXT: -;; CHECK-NEXT: will read foo.wasm and bar.wasm, with names 'foo' and 'bar' respectively, so if -;; CHECK-NEXT: the second imports from 'foo', we will see that as an import from the first +;; CHECK-EMPTY: +;; CHECK-NEXT: will read foo.wasm and bar.wasm, with names 'foo' and 'bar' respectively, so if +;; CHECK-NEXT: the second imports from 'foo', we will see that as an import from the first ;; CHECK-NEXT: module after the merge. The merged output will be written to merged.wasm. -;; CHECK-NEXT: -;; CHECK-NEXT: Note that filenames and modules names are interleaved (which is hopefully less +;; CHECK-EMPTY: +;; CHECK-NEXT: Note that filenames and modules names are interleaved (which is hopefully less ;; CHECK-NEXT: confusing). -;; CHECK-NEXT: -;; CHECK-NEXT: Input source maps can be specified by adding an -ism option right after the +;; CHECK-EMPTY: +;; CHECK-NEXT: Input source maps can be specified by adding an -ism option right after the ;; CHECK-NEXT: module name: -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-merge foo.wasm foo -ism foo.wasm.map ... ;; CHECK-NEXT: ================================================================================ -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-merge options: ;; CHECK-NEXT: ------------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output,-o Output file -;; CHECK-NEXT: -;; CHECK-NEXT: --input-source-map,-ism Consume source maps from the specified +;; CHECK-EMPTY: +;; CHECK-NEXT: --input-source-map,-ism Consume source maps from the specified ;; CHECK-NEXT: files -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output-source-map,-osm Emit source map to the specified file -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output-source-map-url,-osu Emit specified string as source map URL -;; CHECK-NEXT: -;; CHECK-NEXT: --output-manifest Write a wasm-split manifest to the -;; CHECK-NEXT: specified file. This manifest can be -;; CHECK-NEXT: given to wasm-split to split the merged -;; CHECK-NEXT: module along the lines of the original -;; CHECK-NEXT: modules. Implies --debuginfo to preserve +;; CHECK-EMPTY: +;; CHECK-NEXT: --output-manifest Write a wasm-split manifest to the +;; CHECK-NEXT: specified file. This manifest can be +;; CHECK-NEXT: given to wasm-split to split the merged +;; CHECK-NEXT: module along the lines of the original +;; CHECK-NEXT: modules. Implies --debuginfo to preserve ;; CHECK-NEXT: function names in the output module. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --rename-export-conflicts,-rec Rename exports to avoid conflicts (rather ;; CHECK-NEXT: than error) -;; CHECK-NEXT: -;; CHECK-NEXT: --skip-export-conflicts,-sec Skip exports that conflict with previous +;; CHECK-EMPTY: +;; CHECK-NEXT: --skip-export-conflicts,-sec Skip exports that conflict with previous ;; CHECK-NEXT: ones -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for the +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for the ;; CHECK-NEXT: output file -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debuginfo,-g Emit names section and debug info -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Tool options: ;; CHECK-NEXT: ------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --mvp-features,-mvp Disable all non-MVP features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --all-features,-all Enable all features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --detect-features (deprecated - this flag does nothing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --quiet,-q Emit less verbose output and hide trivial ;; CHECK-NEXT: warnings. -;; CHECK-NEXT: -;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing +;; CHECK-EMPTY: +;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing ;; CHECK-NEXT: purposes. -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting ;; CHECK-NEXT: the rest of the names section. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-sign-ext Enable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-sign-ext Disable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-threads Enable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-threads Disable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-mutable-globals Enable mutable globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-mutable-globals Disable mutable globals -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-simd Enable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-simd Disable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory Enable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory Disable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and memory.fill -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-exception-handling Enable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-exception-handling Disable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-tail-call Enable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-tail-call Disable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-reference-types Enable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-reference-types Disable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multivalue Enable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multivalue Disable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-gc Enable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-gc Disable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-memory64 Enable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-memory64 Disable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-simd Enable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-extended-const Enable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-extended-const Disable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-strings Enable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-strings Disable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multimemory Enable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multimemory Disable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-stack-switching Enable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-stack-switching Disable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-shared-everything Enable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-fp16 Enable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-fp16 Disable float 16 operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multibyte Enable multibyte array loads and stores -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads and stores -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-page-sizes Enable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-custom-page-sizes Disable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-wide-arithmetic Enable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-wide-arithmetic Disable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-compact-imports Enable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-compact-imports Disable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: -;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are ;; CHECK-NEXT: correct -;; CHECK-NEXT: -;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization -;; CHECK-NEXT: passes being run. Must be in the form -;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass -;; CHECK-NEXT: then it applies to the closest instance +;; CHECK-EMPTY: +;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization +;; CHECK-NEXT: passes being run. Must be in the form +;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass +;; CHECK-NEXT: then it applies to the closest instance ;; CHECK-NEXT: of that pass before us. If KEY is not the ;; CHECK-NEXT: name of a pass then it is a global option -;; CHECK-NEXT: that applies to all pass instances that +;; CHECK-NEXT: that applies to all pass instances that ;; CHECK-NEXT: read it. -;; CHECK-NEXT: -;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does -;; CHECK-NEXT: not inspect or interact with GC and -;; CHECK-NEXT: function references, even if they are -;; CHECK-NEXT: passed out. The outside may hold on to -;; CHECK-NEXT: them and pass them back in, but not +;; CHECK-EMPTY: +;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does +;; CHECK-NEXT: not inspect or interact with GC and +;; CHECK-NEXT: function references, even if they are +;; CHECK-NEXT: passed out. The outside may hold on to +;; CHECK-NEXT: them and pass them back in, but not ;; CHECK-NEXT: inspect their contents or call them. -;; CHECK-NEXT: -;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the +;; CHECK-EMPTY: +;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the ;; CHECK-NEXT: input (useful for debugging and testing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --generate-stack-ir generate StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-stack-ir optimize StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-stack-ir print StackIR during writing -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: General options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --version Output version information and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debug,-d Print debug information to stderr -;; CHECK-NEXT: +;; CHECK-EMPTY: diff --git a/test/lit/help/wasm-metadce.test b/test/lit/help/wasm-metadce.test index 5e93a909c0f..5b11778ce3c 100644 --- a/test/lit/help/wasm-metadce.test +++ b/test/lit/help/wasm-metadce.test @@ -1,25 +1,25 @@ ;; RUN: wasm-metadce --help | filecheck %s ;; CHECK: ================================================================================ ;; CHECK-NEXT: wasm-metadce INFILE -;; CHECK-NEXT: -;; CHECK-NEXT: This tool performs dead code elimination (DCE) on a larger space that the wasm -;; CHECK-NEXT: module is just a part of. For example, if you have JS and wasm that are +;; CHECK-EMPTY: +;; CHECK-NEXT: This tool performs dead code elimination (DCE) on a larger space that the wasm +;; CHECK-NEXT: module is just a part of. For example, if you have JS and wasm that are ;; CHECK-NEXT: connected, this can DCE the combined graph. By doing so, it is able to eliminate ;; CHECK-NEXT: wasm module exports, which otherwise regular optimizations cannot. -;; CHECK-NEXT: -;; CHECK-NEXT: This tool receives a representation of the reachability graph that the wasm -;; CHECK-NEXT: module resides in, which contains abstract nodes and connections showing what -;; CHECK-NEXT: they reach. Some of those nodes can represent the wasm module's imports and -;; CHECK-NEXT: exports. The tool then completes the graph by adding the internal parts of the +;; CHECK-EMPTY: +;; CHECK-NEXT: This tool receives a representation of the reachability graph that the wasm +;; CHECK-NEXT: module resides in, which contains abstract nodes and connections showing what +;; CHECK-NEXT: they reach. Some of those nodes can represent the wasm module's imports and +;; CHECK-NEXT: exports. The tool then completes the graph by adding the internal parts of the ;; CHECK-NEXT: module, and does DCE on the entire thing. -;; CHECK-NEXT: -;; CHECK-NEXT: This tool will output a wasm module with dead code eliminated, and metadata +;; CHECK-EMPTY: +;; CHECK-NEXT: This tool will output a wasm module with dead code eliminated, and metadata ;; CHECK-NEXT: describing the things in the rest of the graph that can be eliminated as well. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: The graph description file should represent the graph in the following JSON-like -;; CHECK-NEXT: notation (note, this is not true JSON, things like comments, escaping, +;; CHECK-NEXT: notation (note, this is not true JSON, things like comments, escaping, ;; CHECK-NEXT: single-quotes, etc. are not supported): -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: [ ;; CHECK-NEXT: { ;; CHECK-NEXT: "name": "entity1", @@ -40,860 +40,860 @@ ;; CHECK-NEXT: "import": ["module", "import1"] ;; CHECK-NEXT: }, ;; CHECK-NEXT: ] -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Each entity has a name and an optional list of the other entities it reaches. It -;; CHECK-NEXT: can also be marked as a root, export (with the export string), or import (with -;; CHECK-NEXT: the module and import strings). DCE then computes what is reachable from the +;; CHECK-NEXT: can also be marked as a root, export (with the export string), or import (with +;; CHECK-NEXT: the module and import strings). DCE then computes what is reachable from the ;; CHECK-NEXT: roots. ;; CHECK-NEXT: ================================================================================ -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-opt options: ;; CHECK-NEXT: ----------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output,-o Output file -;; CHECK-NEXT: -;; CHECK-NEXT: --input-source-map,-ism Consume source map from the +;; CHECK-EMPTY: +;; CHECK-NEXT: --input-source-map,-ism Consume source map from the ;; CHECK-NEXT: specified file -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output-source-map,-osm Emit source map to the specified ;; CHECK-NEXT: file -;; CHECK-NEXT: -;; CHECK-NEXT: --output-source-map-url,-osu Emit specified string as source +;; CHECK-EMPTY: +;; CHECK-NEXT: --output-source-map-url,-osu Emit specified string as source ;; CHECK-NEXT: map URL -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for ;; CHECK-NEXT: the output file -;; CHECK-NEXT: -;; CHECK-NEXT: --debuginfo,-g Emit names section and debug +;; CHECK-EMPTY: +;; CHECK-NEXT: --debuginfo,-g Emit names section and debug ;; CHECK-NEXT: info -;; CHECK-NEXT: -;; CHECK-NEXT: --graph-file,-f Filename of the graph +;; CHECK-EMPTY: +;; CHECK-NEXT: --graph-file,-f Filename of the graph ;; CHECK-NEXT: description file -;; CHECK-NEXT: -;; CHECK-NEXT: --dump,-d Dump the combined graph file +;; CHECK-EMPTY: +;; CHECK-NEXT: --dump,-d Dump the combined graph file ;; CHECK-NEXT: (useful for debugging) -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Optimization passes: ;; CHECK-NEXT: -------------------- -;; CHECK-NEXT: -;; CHECK-NEXT: --abstract-type-refining refine and merge abstract +;; CHECK-EMPTY: +;; CHECK-NEXT: --abstract-type-refining refine and merge abstract ;; CHECK-NEXT: (never-created) types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --alignment-lowering lower unaligned loads and stores ;; CHECK-NEXT: to smaller aligned ones -;; CHECK-NEXT: -;; CHECK-NEXT: --asyncify async/await style transform, +;; CHECK-EMPTY: +;; CHECK-NEXT: --asyncify async/await style transform, ;; CHECK-NEXT: allowing pausing and resuming -;; CHECK-NEXT: -;; CHECK-NEXT: --avoid-reinterprets Tries to avoid reinterpret +;; CHECK-EMPTY: +;; CHECK-NEXT: --avoid-reinterprets Tries to avoid reinterpret ;; CHECK-NEXT: operations via more loads -;; CHECK-NEXT: -;; CHECK-NEXT: --cfp propagate constant struct field +;; CHECK-EMPTY: +;; CHECK-NEXT: --cfp propagate constant struct field ;; CHECK-NEXT: values -;; CHECK-NEXT: -;; CHECK-NEXT: --cfp-reftest propagate constant struct field +;; CHECK-EMPTY: +;; CHECK-NEXT: --cfp-reftest propagate constant struct field ;; CHECK-NEXT: values, using ref.test -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --coalesce-locals reduce # of locals by coalescing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --coalesce-locals-learning reduce # of locals by coalescing ;; CHECK-NEXT: and learning -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --code-folding fold code, merging duplicates -;; CHECK-NEXT: -;; CHECK-NEXT: --code-pushing push code forward, potentially +;; CHECK-EMPTY: +;; CHECK-NEXT: --code-pushing push code forward, potentially ;; CHECK-NEXT: making it not always execute -;; CHECK-NEXT: -;; CHECK-NEXT: --const-hoisting hoist repeated constants to a +;; CHECK-EMPTY: +;; CHECK-NEXT: --const-hoisting hoist repeated constants to a ;; CHECK-NEXT: local -;; CHECK-NEXT: -;; CHECK-NEXT: --constraint-analysis finds and uses mathematical +;; CHECK-EMPTY: +;; CHECK-NEXT: --constraint-analysis finds and uses mathematical ;; CHECK-NEXT: constraints on locals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dae removes arguments to calls in an ;; CHECK-NEXT: lto-like manner -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dae-optimizing removes arguments to calls in an -;; CHECK-NEXT: lto-like manner, and optimizes +;; CHECK-NEXT: lto-like manner, and optimizes ;; CHECK-NEXT: where we removed -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dae2 Experimental reimplementation of ;; CHECK-NEXT: DAE -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dce removes unreachable code -;; CHECK-NEXT: -;; CHECK-NEXT: --dealign forces all loads and stores to +;; CHECK-EMPTY: +;; CHECK-NEXT: --dealign forces all loads and stores to ;; CHECK-NEXT: have alignment 1 -;; CHECK-NEXT: -;; CHECK-NEXT: --denan instrument the wasm to convert +;; CHECK-EMPTY: +;; CHECK-NEXT: --denan instrument the wasm to convert ;; CHECK-NEXT: NaNs into 0 at runtime -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dfo optimizes using the DataFlow SSA ;; CHECK-NEXT: IR -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --directize turns indirect calls into direct ;; CHECK-NEXT: ones -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --discard-global-effects discards global effect info -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --duplicate-function-elimination removes duplicate functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --duplicate-import-elimination removes duplicate imports -;; CHECK-NEXT: -;; CHECK-NEXT: --dwarfdump dump DWARF debug info sections +;; CHECK-EMPTY: +;; CHECK-NEXT: --dwarfdump dump DWARF debug info sections ;; CHECK-NEXT: from the read binary -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --emit-target-features emit the target features section ;; CHECK-NEXT: in the output -;; CHECK-NEXT: -;; CHECK-NEXT: --enclose-world modify the wasm (destructively) +;; CHECK-EMPTY: +;; CHECK-NEXT: --enclose-world modify the wasm (destructively) ;; CHECK-NEXT: for closed-world -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --extract-function leaves just one function (useful ;; CHECK-NEXT: for debugging) -;; CHECK-NEXT: -;; CHECK-NEXT: --extract-function-index leaves just one function +;; CHECK-EMPTY: +;; CHECK-NEXT: --extract-function-index leaves just one function ;; CHECK-NEXT: selected by index -;; CHECK-NEXT: -;; CHECK-NEXT: --flatten flattens out code, removing +;; CHECK-EMPTY: +;; CHECK-NEXT: --flatten flattens out code, removing ;; CHECK-NEXT: nesting -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --fpcast-emu emulates function pointer casts, -;; CHECK-NEXT: allowing incorrect indirect +;; CHECK-NEXT: allowing incorrect indirect ;; CHECK-NEXT: calls to (sometimes) work -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --func-metrics reports function metrics -;; CHECK-NEXT: -;; CHECK-NEXT: --generate-dyncalls generate dynCall functions used +;; CHECK-EMPTY: +;; CHECK-NEXT: --generate-dyncalls generate dynCall functions used ;; CHECK-NEXT: by emscripten ABI -;; CHECK-NEXT: -;; CHECK-NEXT: --generate-global-effects generate global effect info +;; CHECK-EMPTY: +;; CHECK-NEXT: --generate-global-effects generate global effect info ;; CHECK-NEXT: (helps later passes) -;; CHECK-NEXT: -;; CHECK-NEXT: --generate-i64-dyncalls generate dynCall functions used -;; CHECK-NEXT: by emscripten ABI, but only for -;; CHECK-NEXT: functions with i64 in their -;; CHECK-NEXT: signature (which cannot be -;; CHECK-NEXT: invoked via the wasm table -;; CHECK-NEXT: without JavaScript BigInt +;; CHECK-EMPTY: +;; CHECK-NEXT: --generate-i64-dyncalls generate dynCall functions used +;; CHECK-NEXT: by emscripten ABI, but only for +;; CHECK-NEXT: functions with i64 in their +;; CHECK-NEXT: signature (which cannot be +;; CHECK-NEXT: invoked via the wasm table +;; CHECK-NEXT: without JavaScript BigInt ;; CHECK-NEXT: support). -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --global-refining refine the types of globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --gsi globally optimize struct values -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --gsi-desc-cast globally optimize struct values, ;; CHECK-NEXT: also emitting ref.cast_desc_eq -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --gto globally optimize GC types -;; CHECK-NEXT: -;; CHECK-NEXT: --gufa Grand Unified Flow Analysis: -;; CHECK-NEXT: optimize the entire program -;; CHECK-NEXT: using information about what -;; CHECK-NEXT: content can actually appear in +;; CHECK-EMPTY: +;; CHECK-NEXT: --gufa Grand Unified Flow Analysis: +;; CHECK-NEXT: optimize the entire program +;; CHECK-NEXT: using information about what +;; CHECK-NEXT: content can actually appear in ;; CHECK-NEXT: each location -;; CHECK-NEXT: -;; CHECK-NEXT: --gufa-cast-all GUFA plus add casts for all +;; CHECK-EMPTY: +;; CHECK-NEXT: --gufa-cast-all GUFA plus add casts for all ;; CHECK-NEXT: inferences -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --gufa-optimizing GUFA plus local optimizations in ;; CHECK-NEXT: functions we modified -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --heap-store-optimization optimize heap (GC) stores -;; CHECK-NEXT: -;; CHECK-NEXT: --heap2local replace GC allocations with +;; CHECK-EMPTY: +;; CHECK-NEXT: --heap2local replace GC allocations with ;; CHECK-NEXT: locals -;; CHECK-NEXT: -;; CHECK-NEXT: --i64-to-i32-lowering lower all uses of i64s to use +;; CHECK-EMPTY: +;; CHECK-NEXT: --i64-to-i32-lowering lower all uses of i64s to use ;; CHECK-NEXT: i32s instead -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --inline-main inline __original_main into main -;; CHECK-NEXT: -;; CHECK-NEXT: --inlining inline functions (you probably +;; CHECK-EMPTY: +;; CHECK-NEXT: --inlining inline functions (you probably ;; CHECK-NEXT: want inlining-optimizing) -;; CHECK-NEXT: -;; CHECK-NEXT: --inlining-optimizing inline functions and optimizes +;; CHECK-EMPTY: +;; CHECK-NEXT: --inlining-optimizing inline functions and optimizes ;; CHECK-NEXT: where we inlined -;; CHECK-NEXT: -;; CHECK-NEXT: --instrument-branch-hints instrument branch hints so we +;; CHECK-EMPTY: +;; CHECK-NEXT: --instrument-branch-hints instrument branch hints so we ;; CHECK-NEXT: can see which guessed right -;; CHECK-NEXT: -;; CHECK-NEXT: --instrument-locals instrument the build with code -;; CHECK-NEXT: to intercept all loads and +;; CHECK-EMPTY: +;; CHECK-NEXT: --instrument-locals instrument the build with code +;; CHECK-NEXT: to intercept all loads and ;; CHECK-NEXT: stores -;; CHECK-NEXT: -;; CHECK-NEXT: --instrument-memory instrument the build with code -;; CHECK-NEXT: to intercept all loads and +;; CHECK-EMPTY: +;; CHECK-NEXT: --instrument-memory instrument the build with code +;; CHECK-NEXT: to intercept all loads and ;; CHECK-NEXT: stores -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --intrinsic-lowering lower away binaryen intrinsics -;; CHECK-NEXT: -;; CHECK-NEXT: --legalize-and-prune-js-interface legalizes the import/export +;; CHECK-EMPTY: +;; CHECK-NEXT: --legalize-and-prune-js-interface legalizes the import/export ;; CHECK-NEXT: boundary and prunes when needed -;; CHECK-NEXT: -;; CHECK-NEXT: --legalize-js-interface legalizes i64 types on the +;; CHECK-EMPTY: +;; CHECK-NEXT: --legalize-js-interface legalizes i64 types on the ;; CHECK-NEXT: import/export boundary -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --licm loop invariant code motion -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --limit-segments attempt to merge segments to fit ;; CHECK-NEXT: within web limits -;; CHECK-NEXT: -;; CHECK-NEXT: --llvm-memory-copy-fill-lowering Lower memory.copy and -;; CHECK-NEXT: memory.fill to wasm mvp and +;; CHECK-EMPTY: +;; CHECK-NEXT: --llvm-memory-copy-fill-lowering Lower memory.copy and +;; CHECK-NEXT: memory.fill to wasm mvp and ;; CHECK-NEXT: disable the bulk-memory feature. -;; CHECK-NEXT: -;; CHECK-NEXT: --llvm-nontrapping-fptoint-lowering lower nontrapping float-to-int -;; CHECK-NEXT: operations to wasm mvp and -;; CHECK-NEXT: disable the nontrapping fptoint +;; CHECK-EMPTY: +;; CHECK-NEXT: --llvm-nontrapping-fptoint-lowering lower nontrapping float-to-int +;; CHECK-NEXT: operations to wasm mvp and +;; CHECK-NEXT: disable the nontrapping fptoint ;; CHECK-NEXT: feature -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --local-cse common subexpression elimination ;; CHECK-NEXT: inside basic blocks -;; CHECK-NEXT: -;; CHECK-NEXT: --local-subtyping apply more specific subtypes to +;; CHECK-EMPTY: +;; CHECK-NEXT: --local-subtyping apply more specific subtypes to ;; CHECK-NEXT: locals where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --log-execution instrument the build with +;; CHECK-EMPTY: +;; CHECK-NEXT: --log-execution instrument the build with ;; CHECK-NEXT: logging of where execution goes -;; CHECK-NEXT: -;; CHECK-NEXT: --make-shared-objects Make structs and arrays shared +;; CHECK-EMPTY: +;; CHECK-NEXT: --make-shared-objects Make structs and arrays shared ;; CHECK-NEXT: and functions unshared -;; CHECK-NEXT: -;; CHECK-NEXT: --mark-js-called mark js called functions (using +;; CHECK-EMPTY: +;; CHECK-NEXT: --mark-js-called mark js called functions (using ;; CHECK-NEXT: configureAll) as doing so -;; CHECK-NEXT: -;; CHECK-NEXT: --memory-packing packs memory into separate +;; CHECK-EMPTY: +;; CHECK-NEXT: --memory-packing packs memory into separate ;; CHECK-NEXT: segments, skipping zeros -;; CHECK-NEXT: -;; CHECK-NEXT: --memory64-lowering lower loads and stores to a -;; CHECK-NEXT: 64-bit memory to instead use a +;; CHECK-EMPTY: +;; CHECK-NEXT: --memory64-lowering lower loads and stores to a +;; CHECK-NEXT: 64-bit memory to instead use a ;; CHECK-NEXT: 32-bit one -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --merge-blocks merges blocks to their parents -;; CHECK-NEXT: -;; CHECK-NEXT: --merge-j2cl-itables Merges itable structures into -;; CHECK-NEXT: vtables to make types more +;; CHECK-EMPTY: +;; CHECK-NEXT: --merge-j2cl-itables Merges itable structures into +;; CHECK-NEXT: vtables to make types more ;; CHECK-NEXT: compact -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --merge-locals merges locals when beneficial -;; CHECK-NEXT: -;; CHECK-NEXT: --merge-similar-functions merges similar functions when +;; CHECK-EMPTY: +;; CHECK-NEXT: --merge-similar-functions merges similar functions when ;; CHECK-NEXT: benefical -;; CHECK-NEXT: -;; CHECK-NEXT: --metrics reports metrics (with an -;; CHECK-NEXT: optional title, +;; CHECK-EMPTY: +;; CHECK-NEXT: --metrics reports metrics (with an +;; CHECK-NEXT: optional title, ;; CHECK-NEXT: --metrics[=TITLE]) -;; CHECK-NEXT: -;; CHECK-NEXT: --minify-imports minifies import names (only -;; CHECK-NEXT: those, and not export names), -;; CHECK-NEXT: and emits a mapping to the +;; CHECK-EMPTY: +;; CHECK-NEXT: --minify-imports minifies import names (only +;; CHECK-NEXT: those, and not export names), +;; CHECK-NEXT: and emits a mapping to the ;; CHECK-NEXT: minified ones -;; CHECK-NEXT: -;; CHECK-NEXT: --minify-imports-and-exports minifies both import and export -;; CHECK-NEXT: names, and emits a mapping to +;; CHECK-EMPTY: +;; CHECK-NEXT: --minify-imports-and-exports minifies both import and export +;; CHECK-NEXT: names, and emits a mapping to ;; CHECK-NEXT: the minified ones -;; CHECK-NEXT: -;; CHECK-NEXT: --minify-imports-and-exports-and-modules minifies both import and export -;; CHECK-NEXT: names, and emits a mapping to -;; CHECK-NEXT: the minified ones, and minifies +;; CHECK-EMPTY: +;; CHECK-NEXT: --minify-imports-and-exports-and-modules minifies both import and export +;; CHECK-NEXT: names, and emits a mapping to +;; CHECK-NEXT: the minified ones, and minifies ;; CHECK-NEXT: the modules as well -;; CHECK-NEXT: -;; CHECK-NEXT: --minimize-rec-groups Split types into minimal +;; CHECK-EMPTY: +;; CHECK-NEXT: --minimize-rec-groups Split types into minimal ;; CHECK-NEXT: recursion groups -;; CHECK-NEXT: -;; CHECK-NEXT: --monomorphize creates specialized versions of +;; CHECK-EMPTY: +;; CHECK-NEXT: --monomorphize creates specialized versions of ;; CHECK-NEXT: functions -;; CHECK-NEXT: -;; CHECK-NEXT: --monomorphize-always creates specialized versions of +;; CHECK-EMPTY: +;; CHECK-NEXT: --monomorphize-always creates specialized versions of ;; CHECK-NEXT: functions (even if unhelpful) -;; CHECK-NEXT: -;; CHECK-NEXT: --multi-memory-lowering combines multiple memories into +;; CHECK-EMPTY: +;; CHECK-NEXT: --multi-memory-lowering combines multiple memories into ;; CHECK-NEXT: a single memory -;; CHECK-NEXT: -;; CHECK-NEXT: --multi-memory-lowering-with-bounds-checks combines multiple memories into +;; CHECK-EMPTY: +;; CHECK-NEXT: --multi-memory-lowering-with-bounds-checks combines multiple memories into ;; CHECK-NEXT: a single memory, trapping if the ;; CHECK-NEXT: read or write is larger than the ;; CHECK-NEXT: length of the memory's data -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --name-types (re)name all heap types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --nm name list -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --no-full-inline mark functions as no-inline (for ;; CHECK-NEXT: full inlining only) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --no-inline mark functions as no-inline -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --no-partial-inline mark functions as no-inline (for ;; CHECK-NEXT: partial inlining only) -;; CHECK-NEXT: -;; CHECK-NEXT: --once-reduction reduces calls to code that only +;; CHECK-EMPTY: +;; CHECK-NEXT: --once-reduction reduces calls to code that only ;; CHECK-NEXT: runs once -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-added-constants optimizes added constants into +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-added-constants optimizes added constants into ;; CHECK-NEXT: load/store offsets -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-added-constants-propagate optimizes added constants into -;; CHECK-NEXT: load/store offsets, propagating +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-added-constants-propagate optimizes added constants into +;; CHECK-NEXT: load/store offsets, propagating ;; CHECK-NEXT: them across locals too -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-casts eliminate and reuse casts -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-for-js early optimize of the +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-for-js early optimize of the ;; CHECK-NEXT: instruction combinations for js -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-instructions optimizes instruction +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-instructions optimizes instruction ;; CHECK-NEXT: combinations -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-j2cl optimizes J2CL specific +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-j2cl optimizes J2CL specific ;; CHECK-NEXT: constructs. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --outlining outline instructions -;; CHECK-NEXT: -;; CHECK-NEXT: --pick-load-signs pick load signs based on their +;; CHECK-EMPTY: +;; CHECK-NEXT: --pick-load-signs pick load signs based on their ;; CHECK-NEXT: uses -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --poppify Transform Binaryen IR into Poppy ;; CHECK-NEXT: IR -;; CHECK-NEXT: -;; CHECK-NEXT: --post-emscripten miscellaneous optimizations for +;; CHECK-EMPTY: +;; CHECK-NEXT: --post-emscripten miscellaneous optimizations for ;; CHECK-NEXT: Emscripten-generated code -;; CHECK-NEXT: -;; CHECK-NEXT: --precompute computes compile-time +;; CHECK-EMPTY: +;; CHECK-NEXT: --precompute computes compile-time ;; CHECK-NEXT: evaluatable expressions -;; CHECK-NEXT: -;; CHECK-NEXT: --precompute-propagate computes compile-time -;; CHECK-NEXT: evaluatable expressions and +;; CHECK-EMPTY: +;; CHECK-NEXT: --precompute-propagate computes compile-time +;; CHECK-NEXT: evaluatable expressions and ;; CHECK-NEXT: propagates them through locals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print print in s-expression format -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-boundary print boundary in JSON format -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-call-graph print call graph -;; CHECK-NEXT: -;; CHECK-NEXT: --print-features print options for enabled +;; CHECK-EMPTY: +;; CHECK-NEXT: --print-features print options for enabled ;; CHECK-NEXT: features -;; CHECK-NEXT: -;; CHECK-NEXT: --print-full print in full s-expression +;; CHECK-EMPTY: +;; CHECK-NEXT: --print-full print in full s-expression ;; CHECK-NEXT: format -;; CHECK-NEXT: -;; CHECK-NEXT: --print-function-map print a map of function indexes +;; CHECK-EMPTY: +;; CHECK-NEXT: --print-function-map print a map of function indexes ;; CHECK-NEXT: to names -;; CHECK-NEXT: -;; CHECK-NEXT: --print-minified print in minified s-expression +;; CHECK-EMPTY: +;; CHECK-NEXT: --print-minified print in minified s-expression ;; CHECK-NEXT: format -;; CHECK-NEXT: -;; CHECK-NEXT: --propagate-debug-locs propagate debug location from -;; CHECK-NEXT: parents or previous siblings to +;; CHECK-EMPTY: +;; CHECK-NEXT: --propagate-debug-locs propagate debug location from +;; CHECK-NEXT: parents or previous siblings to ;; CHECK-NEXT: child nodes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --propagate-globals-globally propagate global values to other ;; CHECK-NEXT: globals (useful for tests) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --remove-exports removes exports using a wildcard -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-imports removes imports and replaces +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-imports removes imports and replaces ;; CHECK-NEXT: them with nops -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-memory removes memory init (legacy +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-memory removes memory init (legacy ;; CHECK-NEXT: name) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --remove-memory-init removes memory initialization -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-non-js-ops removes operations incompatible +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-non-js-ops removes operations incompatible ;; CHECK-NEXT: with js -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-relaxed-simd replaces relaxed SIMD +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-relaxed-simd replaces relaxed SIMD ;; CHECK-NEXT: instructions with unreachable -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-unused-brs removes breaks from locations +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-unused-brs removes breaks from locations ;; CHECK-NEXT: that are not needed -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --remove-unused-module-elements removes unused module elements -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-unused-names removes names from locations +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-unused-names removes names from locations ;; CHECK-NEXT: that are never branched to -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-unused-nonfunction-module-elements removes unused module elements +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-unused-nonfunction-module-elements removes unused module elements ;; CHECK-NEXT: that are not functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --remove-unused-types remove unused private GC types -;; CHECK-NEXT: -;; CHECK-NEXT: --reorder-functions sorts functions by access +;; CHECK-EMPTY: +;; CHECK-NEXT: --reorder-functions sorts functions by access ;; CHECK-NEXT: frequency -;; CHECK-NEXT: -;; CHECK-NEXT: --reorder-functions-by-name sorts functions by name (useful +;; CHECK-EMPTY: +;; CHECK-NEXT: --reorder-functions-by-name sorts functions by name (useful ;; CHECK-NEXT: for debugging) -;; CHECK-NEXT: -;; CHECK-NEXT: --reorder-globals sorts globals by access +;; CHECK-EMPTY: +;; CHECK-NEXT: --reorder-globals sorts globals by access ;; CHECK-NEXT: frequency -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --reorder-locals sorts locals by access frequency -;; CHECK-NEXT: -;; CHECK-NEXT: --reorder-types sorts private types by access +;; CHECK-EMPTY: +;; CHECK-NEXT: --reorder-types sorts private types by access ;; CHECK-NEXT: frequency -;; CHECK-NEXT: -;; CHECK-NEXT: --rereloop re-optimize control flow using +;; CHECK-EMPTY: +;; CHECK-NEXT: --rereloop re-optimize control flow using ;; CHECK-NEXT: the relooper algorithm -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --roundtrip write the module to binary, then ;; CHECK-NEXT: read it -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --rse remove redundant local.sets -;; CHECK-NEXT: -;; CHECK-NEXT: --safe-heap instrument loads and stores to +;; CHECK-EMPTY: +;; CHECK-NEXT: --safe-heap instrument loads and stores to ;; CHECK-NEXT: check for invalid behavior -;; CHECK-NEXT: -;; CHECK-NEXT: --separate-data-segments write data segments to a file +;; CHECK-EMPTY: +;; CHECK-NEXT: --separate-data-segments write data segments to a file ;; CHECK-NEXT: and strip them from the module -;; CHECK-NEXT: -;; CHECK-NEXT: --set-globals sets specified globals to +;; CHECK-EMPTY: +;; CHECK-NEXT: --set-globals sets specified globals to ;; CHECK-NEXT: specified values -;; CHECK-NEXT: -;; CHECK-NEXT: --signature-pruning remove params from function +;; CHECK-EMPTY: +;; CHECK-NEXT: --signature-pruning remove params from function ;; CHECK-NEXT: signature types where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --signature-refining apply more specific subtypes to +;; CHECK-EMPTY: +;; CHECK-NEXT: --signature-refining apply more specific subtypes to ;; CHECK-NEXT: signature types where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --signext-lowering lower sign-ext operations to -;; CHECK-NEXT: wasm mvp and disable the sign +;; CHECK-EMPTY: +;; CHECK-NEXT: --signext-lowering lower sign-ext operations to +;; CHECK-NEXT: wasm mvp and disable the sign ;; CHECK-NEXT: extension feature -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-globals miscellaneous globals-related +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-globals miscellaneous globals-related ;; CHECK-NEXT: optimizations -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-globals-optimizing miscellaneous globals-related -;; CHECK-NEXT: optimizations, and optimizes -;; CHECK-NEXT: where we replaced global.gets +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-globals-optimizing miscellaneous globals-related +;; CHECK-NEXT: optimizations, and optimizes +;; CHECK-NEXT: where we replaced global.gets ;; CHECK-NEXT: with constants -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals miscellaneous locals-related +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals miscellaneous locals-related ;; CHECK-NEXT: optimizations -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals-nonesting miscellaneous locals-related -;; CHECK-NEXT: optimizations (no nesting at +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals-nonesting miscellaneous locals-related +;; CHECK-NEXT: optimizations (no nesting at ;; CHECK-NEXT: all; preserves flatness) -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals-nostructure miscellaneous locals-related +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals-nostructure miscellaneous locals-related ;; CHECK-NEXT: optimizations (no structure) -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals-notee miscellaneous locals-related +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals-notee miscellaneous locals-related ;; CHECK-NEXT: optimizations (no tees) -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals-notee-nostructure miscellaneous locals-related -;; CHECK-NEXT: optimizations (no tees or +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals-notee-nostructure miscellaneous locals-related +;; CHECK-NEXT: optimizations (no tees or ;; CHECK-NEXT: structure) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --souperify emit Souper IR in text form -;; CHECK-NEXT: -;; CHECK-NEXT: --souperify-single-use emit Souper IR in text form +;; CHECK-EMPTY: +;; CHECK-NEXT: --souperify-single-use emit Souper IR in text form ;; CHECK-NEXT: (single-use nodes only) -;; CHECK-NEXT: -;; CHECK-NEXT: --spill-pointers spill pointers to the C stack +;; CHECK-EMPTY: +;; CHECK-NEXT: --spill-pointers spill pointers to the C stack ;; CHECK-NEXT: (useful for Boehm-style GC) -;; CHECK-NEXT: -;; CHECK-NEXT: --ssa ssa-ify variables so that they +;; CHECK-EMPTY: +;; CHECK-NEXT: --ssa ssa-ify variables so that they ;; CHECK-NEXT: have a single assignment -;; CHECK-NEXT: -;; CHECK-NEXT: --ssa-nomerge ssa-ify variables so that they -;; CHECK-NEXT: have a single assignment, +;; CHECK-EMPTY: +;; CHECK-NEXT: --ssa-nomerge ssa-ify variables so that they +;; CHECK-NEXT: have a single assignment, ;; CHECK-NEXT: ignoring merges -;; CHECK-NEXT: -;; CHECK-NEXT: --stack-check enforce limits on llvm's +;; CHECK-EMPTY: +;; CHECK-NEXT: --stack-check enforce limits on llvm's ;; CHECK-NEXT: __stack_pointer global -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --string-gathering gathers wasm strings to globals -;; CHECK-NEXT: -;; CHECK-NEXT: --string-lifting lift string imports to wasm +;; CHECK-EMPTY: +;; CHECK-NEXT: --string-lifting lift string imports to wasm ;; CHECK-NEXT: strings -;; CHECK-NEXT: -;; CHECK-NEXT: --string-lowering lowers wasm strings and +;; CHECK-EMPTY: +;; CHECK-NEXT: --string-lowering lowers wasm strings and ;; CHECK-NEXT: operations to imports -;; CHECK-NEXT: -;; CHECK-NEXT: --string-lowering-magic-imports same as string-lowering, but -;; CHECK-NEXT: encodes well-formed strings as +;; CHECK-EMPTY: +;; CHECK-NEXT: --string-lowering-magic-imports same as string-lowering, but +;; CHECK-NEXT: encodes well-formed strings as ;; CHECK-NEXT: magic imports -;; CHECK-NEXT: -;; CHECK-NEXT: --string-lowering-magic-imports-assert same as -;; CHECK-NEXT: string-lowering-magic-imports, +;; CHECK-EMPTY: +;; CHECK-NEXT: --string-lowering-magic-imports-assert same as +;; CHECK-NEXT: string-lowering-magic-imports, ;; CHECK-NEXT: but raise a fatal error if there ;; CHECK-NEXT: are invalid strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --strip deprecated; same as strip-debug -;; CHECK-NEXT: -;; CHECK-NEXT: --strip-debug strip debug info (including the +;; CHECK-EMPTY: +;; CHECK-NEXT: --strip-debug strip debug info (including the ;; CHECK-NEXT: names section) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --strip-dwarf strip dwarf debug info -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --strip-eh strip EH instructions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --strip-producers strip the wasm producers section -;; CHECK-NEXT: -;; CHECK-NEXT: --strip-target-features strip the wasm target features +;; CHECK-EMPTY: +;; CHECK-NEXT: --strip-target-features strip the wasm target features ;; CHECK-NEXT: section -;; CHECK-NEXT: -;; CHECK-NEXT: --strip-toolchain-annotations strip all toolchain-specific +;; CHECK-EMPTY: +;; CHECK-NEXT: --strip-toolchain-annotations strip all toolchain-specific ;; CHECK-NEXT: code annotations -;; CHECK-NEXT: -;; CHECK-NEXT: --stub-unsupported-js stub out unsupported JS +;; CHECK-EMPTY: +;; CHECK-NEXT: --stub-unsupported-js stub out unsupported JS ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --symbolmap (alias for print-function-map) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --table64-lowering alias for memory64-lowering -;; CHECK-NEXT: -;; CHECK-NEXT: --trace-calls instrument the build with code -;; CHECK-NEXT: to intercept specific function +;; CHECK-EMPTY: +;; CHECK-NEXT: --trace-calls instrument the build with code +;; CHECK-NEXT: to intercept specific function ;; CHECK-NEXT: calls -;; CHECK-NEXT: -;; CHECK-NEXT: --translate-to-exnref translate old Phase 3 EH -;; CHECK-NEXT: instructions to new ones with +;; CHECK-EMPTY: +;; CHECK-NEXT: --translate-to-exnref translate old Phase 3 EH +;; CHECK-NEXT: instructions to new ones with ;; CHECK-NEXT: exnref -;; CHECK-NEXT: -;; CHECK-NEXT: --translate-to-new-eh deprecated; same as +;; CHECK-EMPTY: +;; CHECK-NEXT: --translate-to-new-eh deprecated; same as ;; CHECK-NEXT: translate-to-exnref -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --trap-mode-clamp replace trapping operations with ;; CHECK-NEXT: clamping semantics -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --trap-mode-js replace trapping operations with ;; CHECK-NEXT: js semantics -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --tuple-optimization optimize trivial tuples away -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --type-finalizing mark all leaf types as final -;; CHECK-NEXT: -;; CHECK-NEXT: --type-merging merge types to their supertypes +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-merging merge types to their supertypes ;; CHECK-NEXT: where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --type-refining apply more specific subtypes to -;; CHECK-NEXT: type fields where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --type-refining-gufa apply more specific subtypes to +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-refining apply more specific subtypes to ;; CHECK-NEXT: type fields where possible +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-refining-gufa apply more specific subtypes to +;; CHECK-NEXT: type fields where possible ;; CHECK-NEXT: (using GUFA) -;; CHECK-NEXT: -;; CHECK-NEXT: --type-ssa create new types to help other +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-ssa create new types to help other ;; CHECK-NEXT: optimizations -;; CHECK-NEXT: -;; CHECK-NEXT: --type-unfinalizing mark all types as non-final +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-unfinalizing mark all types as non-final ;; CHECK-NEXT: (open) -;; CHECK-NEXT: -;; CHECK-NEXT: --unsubtyping removes unnecessary subtyping +;; CHECK-EMPTY: +;; CHECK-NEXT: --unsubtyping removes unnecessary subtyping ;; CHECK-NEXT: relationships -;; CHECK-NEXT: -;; CHECK-NEXT: --untee removes local.tees, replacing +;; CHECK-EMPTY: +;; CHECK-NEXT: --untee removes local.tees, replacing ;; CHECK-NEXT: them with sets and gets -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --vacuum removes obviously unneeded code -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Optimization options: ;; CHECK-NEXT: --------------------- -;; CHECK-NEXT: -;; CHECK-NEXT: -O execute default optimization +;; CHECK-EMPTY: +;; CHECK-NEXT: -O execute default optimization ;; CHECK-NEXT: passes (equivalent to -Os) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: -O0 execute no optimization passes -;; CHECK-NEXT: -;; CHECK-NEXT: -O1 execute -O1 optimization passes -;; CHECK-NEXT: (quick&useful opts, useful for +;; CHECK-EMPTY: +;; CHECK-NEXT: -O1 execute -O1 optimization passes +;; CHECK-NEXT: (quick&useful opts, useful for ;; CHECK-NEXT: iteration builds) -;; CHECK-NEXT: -;; CHECK-NEXT: -O2 execute -O2 optimization passes -;; CHECK-NEXT: (most opts, generally gets most +;; CHECK-EMPTY: +;; CHECK-NEXT: -O2 execute -O2 optimization passes +;; CHECK-NEXT: (most opts, generally gets most ;; CHECK-NEXT: perf) -;; CHECK-NEXT: -;; CHECK-NEXT: -O3 execute -O3 optimization passes -;; CHECK-NEXT: (spends potentially a lot of +;; CHECK-EMPTY: +;; CHECK-NEXT: -O3 execute -O3 optimization passes +;; CHECK-NEXT: (spends potentially a lot of ;; CHECK-NEXT: time optimizing) -;; CHECK-NEXT: -;; CHECK-NEXT: -O4 execute -O4 optimization passes -;; CHECK-NEXT: (also flatten the IR, which can +;; CHECK-EMPTY: +;; CHECK-NEXT: -O4 execute -O4 optimization passes +;; CHECK-NEXT: (also flatten the IR, which can ;; CHECK-NEXT: take a lot more time and memory, -;; CHECK-NEXT: but is useful on more nested / +;; CHECK-NEXT: but is useful on more nested / ;; CHECK-NEXT: complex / less-optimized input) -;; CHECK-NEXT: -;; CHECK-NEXT: -Os execute default optimization +;; CHECK-EMPTY: +;; CHECK-NEXT: -Os execute default optimization ;; CHECK-NEXT: passes, focusing on code size -;; CHECK-NEXT: -;; CHECK-NEXT: -Oz execute default optimization -;; CHECK-NEXT: passes, super-focusing on code +;; CHECK-EMPTY: +;; CHECK-NEXT: -Oz execute default optimization +;; CHECK-NEXT: passes, super-focusing on code ;; CHECK-NEXT: size -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-level,-ol How much to focus on optimizing +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-level,-ol How much to focus on optimizing ;; CHECK-NEXT: code -;; CHECK-NEXT: -;; CHECK-NEXT: --shrink-level,-s How much to focus on shrinking +;; CHECK-EMPTY: +;; CHECK-NEXT: --shrink-level,-s How much to focus on shrinking ;; CHECK-NEXT: code size -;; CHECK-NEXT: -;; CHECK-NEXT: --debuginfo,-g Emit names section in wasm -;; CHECK-NEXT: binary (or full debuginfo in +;; CHECK-EMPTY: +;; CHECK-NEXT: --debuginfo,-g Emit names section in wasm +;; CHECK-NEXT: binary (or full debuginfo in ;; CHECK-NEXT: wast) -;; CHECK-NEXT: -;; CHECK-NEXT: --always-inline-max-function-size,-aimfs Max size of functions that are +;; CHECK-EMPTY: +;; CHECK-NEXT: --always-inline-max-function-size,-aimfs Max size of functions that are ;; CHECK-NEXT: always inlined (default 2, which ;; CHECK-NEXT: is safe for use with -Os builds) -;; CHECK-NEXT: -;; CHECK-NEXT: --flexible-inline-max-function-size,-fimfs Max size of functions that are -;; CHECK-NEXT: inlined when lightweight (no -;; CHECK-NEXT: loops or function calls) when -;; CHECK-NEXT: optimizing aggressively for +;; CHECK-EMPTY: +;; CHECK-NEXT: --flexible-inline-max-function-size,-fimfs Max size of functions that are +;; CHECK-NEXT: inlined when lightweight (no +;; CHECK-NEXT: loops or function calls) when +;; CHECK-NEXT: optimizing aggressively for ;; CHECK-NEXT: speed (-O3). Default: 20 -;; CHECK-NEXT: -;; CHECK-NEXT: --one-caller-inline-max-function-size,-ocimfs Max size of functions that are -;; CHECK-NEXT: inlined when there is only one -;; CHECK-NEXT: caller (default -1, which means +;; CHECK-EMPTY: +;; CHECK-NEXT: --one-caller-inline-max-function-size,-ocimfs Max size of functions that are +;; CHECK-NEXT: inlined when there is only one +;; CHECK-NEXT: caller (default -1, which means ;; CHECK-NEXT: all such functions are inlined) -;; CHECK-NEXT: -;; CHECK-NEXT: --inline-max-combined-binary-size,-imcbs Max size of combined functions +;; CHECK-EMPTY: +;; CHECK-NEXT: --inline-max-combined-binary-size,-imcbs Max size of combined functions ;; CHECK-NEXT: after inlining. Default: 409600 -;; CHECK-NEXT: -;; CHECK-NEXT: --inline-functions-with-loops,-ifwl Allow inlining functions with +;; CHECK-EMPTY: +;; CHECK-NEXT: --inline-functions-with-loops,-ifwl Allow inlining functions with ;; CHECK-NEXT: loops -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --partial-inlining-ifs,-pii Number of ifs allowed in partial -;; CHECK-NEXT: inlining (zero means partial -;; CHECK-NEXT: inlining is disabled) (default: +;; CHECK-NEXT: inlining (zero means partial +;; CHECK-NEXT: inlining is disabled) (default: ;; CHECK-NEXT: 0) -;; CHECK-NEXT: -;; CHECK-NEXT: --ignore-implicit-traps,-iit Optimize under the helpful -;; CHECK-NEXT: assumption that no surprising +;; CHECK-EMPTY: +;; CHECK-NEXT: --ignore-implicit-traps,-iit Optimize under the helpful +;; CHECK-NEXT: assumption that no surprising ;; CHECK-NEXT: traps occur (from load, div/mod, ;; CHECK-NEXT: etc.) -;; CHECK-NEXT: -;; CHECK-NEXT: --traps-never-happen,-tnh Optimize under the helpful -;; CHECK-NEXT: assumption that no trap is -;; CHECK-NEXT: reached at runtime (from load, +;; CHECK-EMPTY: +;; CHECK-NEXT: --traps-never-happen,-tnh Optimize under the helpful +;; CHECK-NEXT: assumption that no trap is +;; CHECK-NEXT: reached at runtime (from load, ;; CHECK-NEXT: div/mod, etc.) -;; CHECK-NEXT: -;; CHECK-NEXT: --low-memory-unused,-lmu Optimize under the helpful -;; CHECK-NEXT: assumption that the low 1K of -;; CHECK-NEXT: memory is not used by the +;; CHECK-EMPTY: +;; CHECK-NEXT: --low-memory-unused,-lmu Optimize under the helpful +;; CHECK-NEXT: assumption that the low 1K of +;; CHECK-NEXT: memory is not used by the ;; CHECK-NEXT: application -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --fast-math,-ffm Optimize floats without handling -;; CHECK-NEXT: corner cases of NaNs and +;; CHECK-NEXT: corner cases of NaNs and ;; CHECK-NEXT: rounding -;; CHECK-NEXT: -;; CHECK-NEXT: --zero-filled-memory,-uim Assume that an imported memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --zero-filled-memory,-uim Assume that an imported memory ;; CHECK-NEXT: will be zero-initialized -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --skip-pass,-sp Skip a pass (do not run it) -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Tool options: ;; CHECK-NEXT: ------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --mvp-features,-mvp Disable all non-MVP features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --all-features,-all Enable all features -;; CHECK-NEXT: -;; CHECK-NEXT: --detect-features (deprecated - this flag does +;; CHECK-EMPTY: +;; CHECK-NEXT: --detect-features (deprecated - this flag does ;; CHECK-NEXT: nothing) -;; CHECK-NEXT: -;; CHECK-NEXT: --quiet,-q Emit less verbose output and +;; CHECK-EMPTY: +;; CHECK-NEXT: --quiet,-q Emit less verbose output and ;; CHECK-NEXT: hide trivial warnings. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for ;; CHECK-NEXT: testing purposes. -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-module-names Emit module names, even if not -;; CHECK-NEXT: emitting the rest of the names +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-module-names Emit module names, even if not +;; CHECK-NEXT: emitting the rest of the names ;; CHECK-NEXT: section. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-sign-ext Enable sign extension operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-sign-ext Disable sign extension +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-sign-ext Disable sign extension ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-threads Enable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-threads Disable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-mutable-globals Enable mutable globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-mutable-globals Disable mutable globals -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-simd Enable SIMD operations and types -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-simd Disable SIMD operations and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-simd Disable SIMD operations and ;; CHECK-NEXT: types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory Enable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory Disable bulk memory operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and ;; CHECK-NEXT: memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and ;; CHECK-NEXT: memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of -;; CHECK-NEXT: call-indirect (Ignored for -;; CHECK-NEXT: compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of +;; CHECK-NEXT: call-indirect (Ignored for +;; CHECK-NEXT: compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of -;; CHECK-NEXT: call-indirect (Ignored for -;; CHECK-NEXT: compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of +;; CHECK-NEXT: call-indirect (Ignored for +;; CHECK-NEXT: compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-exception-handling Enable exception handling +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-exception-handling Enable exception handling ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-exception-handling Disable exception handling +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-exception-handling Disable exception handling ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-tail-call Enable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-tail-call Disable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-reference-types Enable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-reference-types Disable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multivalue Enable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multivalue Disable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-gc Enable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-gc Disable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-memory64 Enable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-memory64 Disable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-simd Enable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-extended-const Enable extended const +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-extended-const Enable extended const ;; CHECK-NEXT: expressions -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-extended-const Disable extended const +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-extended-const Disable extended const ;; CHECK-NEXT: expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-strings Enable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-strings Disable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multimemory Enable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multimemory Disable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-stack-switching Enable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-stack-switching Disable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-shared-everything Enable shared-everything threads -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-shared-everything Disable shared-everything +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-shared-everything Disable shared-everything ;; CHECK-NEXT: threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-fp16 Enable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-fp16 Disable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) ;; CHECK-NEXT: and exact references -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors ;; CHECK-NEXT: (RTTs) and exact references -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multibyte Enable multibyte array loads and ;; CHECK-NEXT: stores -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads ;; CHECK-NEXT: and stores -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic ;; CHECK-NEXT: memory operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic ;; CHECK-NEXT: memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-page-sizes Enable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-custom-page-sizes Disable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-wide-arithmetic Enable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-wide-arithmetic Disable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-compact-imports Enable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-compact-imports Disable compact import section -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: -;; CHECK-NEXT: --no-validation,-n Disables validation, assumes +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-validation,-n Disables validation, assumes ;; CHECK-NEXT: inputs are correct -;; CHECK-NEXT: -;; CHECK-NEXT: --pass-arg,-pa An argument passed along to -;; CHECK-NEXT: optimization passes being run. -;; CHECK-NEXT: Must be in the form KEY@VALUE. -;; CHECK-NEXT: If KEY is the name of a pass -;; CHECK-NEXT: then it applies to the closest +;; CHECK-EMPTY: +;; CHECK-NEXT: --pass-arg,-pa An argument passed along to +;; CHECK-NEXT: optimization passes being run. +;; CHECK-NEXT: Must be in the form KEY@VALUE. +;; CHECK-NEXT: If KEY is the name of a pass +;; CHECK-NEXT: then it applies to the closest ;; CHECK-NEXT: instance of that pass before us. ;; CHECK-NEXT: If KEY is not the name of a pass -;; CHECK-NEXT: then it is a global option that -;; CHECK-NEXT: applies to all pass instances +;; CHECK-NEXT: then it is a global option that +;; CHECK-NEXT: applies to all pass instances ;; CHECK-NEXT: that read it. -;; CHECK-NEXT: -;; CHECK-NEXT: --closed-world,-cw Assume code outside of the -;; CHECK-NEXT: module does not inspect or -;; CHECK-NEXT: interact with GC and function -;; CHECK-NEXT: references, even if they are +;; CHECK-EMPTY: +;; CHECK-NEXT: --closed-world,-cw Assume code outside of the +;; CHECK-NEXT: module does not inspect or +;; CHECK-NEXT: interact with GC and function +;; CHECK-NEXT: references, even if they are ;; CHECK-NEXT: passed out. The outside may hold -;; CHECK-NEXT: on to them and pass them back -;; CHECK-NEXT: in, but not inspect their +;; CHECK-NEXT: on to them and pass them back +;; CHECK-NEXT: in, but not inspect their ;; CHECK-NEXT: contents or call them. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --preserve-type-order Preserve the order of types from -;; CHECK-NEXT: the input (useful for debugging +;; CHECK-NEXT: the input (useful for debugging ;; CHECK-NEXT: and testing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --generate-stack-ir generate StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-stack-ir optimize StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-stack-ir print StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --no-stack-ir do not use StackIR (even when it ;; CHECK-NEXT: is the default) -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: General options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: -;; CHECK-NEXT: --version Output version information and +;; CHECK-EMPTY: +;; CHECK-NEXT: --version Output version information and ;; CHECK-NEXT: exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: -;; CHECK-NEXT: --debug,-d Print debug information to +;; CHECK-EMPTY: +;; CHECK-NEXT: --debug,-d Print debug information to ;; CHECK-NEXT: stderr -;; CHECK-NEXT: +;; CHECK-EMPTY: diff --git a/test/lit/help/wasm-opt.test b/test/lit/help/wasm-opt.test index 16a7a643ed4..12add8d5783 100644 --- a/test/lit/help/wasm-opt.test +++ b/test/lit/help/wasm-opt.test @@ -1,935 +1,935 @@ ;; RUN: wasm-opt --help | filecheck %s ;; CHECK: ================================================================================ ;; CHECK-NEXT: wasm-opt INFILE -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Read, write, and optimize files. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Example usage: -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-opt input.wasm -O3 -o output.wasm -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: This reads an input wasm file, optimizes with -O3, and writes out the result. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: For more on how to optimize effectively, see -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: https://github.com/WebAssembly/binaryen/wiki/Optimizer-Cookbook ;; CHECK-NEXT: https://github.com/WebAssembly/binaryen/wiki/GC-Optimization-Guidebook -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: ================================================================================ -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-opt options: ;; CHECK-NEXT: ----------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output,-o Output file -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for ;; CHECK-NEXT: the output file -;; CHECK-NEXT: -;; CHECK-NEXT: --converge,-c Run passes to convergence, -;; CHECK-NEXT: continuing while binary size +;; CHECK-EMPTY: +;; CHECK-NEXT: --converge,-c Run passes to convergence, +;; CHECK-NEXT: continuing while binary size ;; CHECK-NEXT: decreases -;; CHECK-NEXT: -;; CHECK-NEXT: --fuzz-exec-before,-feh Execute functions before -;; CHECK-NEXT: optimization, helping fuzzing +;; CHECK-EMPTY: +;; CHECK-NEXT: --fuzz-exec-before,-feh Execute functions before +;; CHECK-NEXT: optimization, helping fuzzing ;; CHECK-NEXT: find bugs -;; CHECK-NEXT: -;; CHECK-NEXT: --fuzz-exec,-fe Execute functions before and -;; CHECK-NEXT: after optimization, helping +;; CHECK-EMPTY: +;; CHECK-NEXT: --fuzz-exec,-fe Execute functions before and +;; CHECK-NEXT: after optimization, helping ;; CHECK-NEXT: fuzzing find bugs -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --fuzz-exec-second A second module to link with the -;; CHECK-NEXT: first, for fuzz-exec-before -;; CHECK-NEXT: (only before, as optimizations +;; CHECK-NEXT: first, for fuzz-exec-before +;; CHECK-NEXT: (only before, as optimizations ;; CHECK-NEXT: are not applied to it) -;; CHECK-NEXT: -;; CHECK-NEXT: --extra-fuzz-command,-efc An extra command to run on the -;; CHECK-NEXT: output before and after -;; CHECK-NEXT: optimizing. The output is +;; CHECK-EMPTY: +;; CHECK-NEXT: --extra-fuzz-command,-efc An extra command to run on the +;; CHECK-NEXT: output before and after +;; CHECK-NEXT: optimizing. The output is ;; CHECK-NEXT: compared between the two, and an -;; CHECK-NEXT: error occurs if they are not +;; CHECK-NEXT: error occurs if they are not ;; CHECK-NEXT: equal -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --translate-to-fuzz,-ttf Translate the input into a valid -;; CHECK-NEXT: wasm module *somehow*, useful +;; CHECK-NEXT: wasm module *somehow*, useful ;; CHECK-NEXT: for fuzzing -;; CHECK-NEXT: -;; CHECK-NEXT: --initial-fuzz,-if Initial wasm content in +;; CHECK-EMPTY: +;; CHECK-NEXT: --initial-fuzz,-if Initial wasm content in ;; CHECK-NEXT: translate-to-fuzz (-ttf) mode -;; CHECK-NEXT: -;; CHECK-NEXT: --fuzz-passes,-fp When doing translate-to-fuzz, +;; CHECK-EMPTY: +;; CHECK-NEXT: --fuzz-passes,-fp When doing translate-to-fuzz, ;; CHECK-NEXT: pick a set of random passes from -;; CHECK-NEXT: the input to further shape the +;; CHECK-NEXT: the input to further shape the ;; CHECK-NEXT: wasm -;; CHECK-NEXT: -;; CHECK-NEXT: --no-fuzz-memory don't emit memory ops when +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-fuzz-memory don't emit memory ops when ;; CHECK-NEXT: fuzzing -;; CHECK-NEXT: -;; CHECK-NEXT: --no-fuzz-oob don't emit out-of-bounds +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-fuzz-oob don't emit out-of-bounds ;; CHECK-NEXT: loads/stores/indirect calls when ;; CHECK-NEXT: fuzzing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --fuzz-preserve-imports-exports don't add imports and exports in ;; CHECK-NEXT: -ttf mode, and keep the start -;; CHECK-NEXT: -;; CHECK-NEXT: --fuzz-against-js modify the wasm in valid ways +;; CHECK-EMPTY: +;; CHECK-NEXT: --fuzz-against-js modify the wasm in valid ways ;; CHECK-NEXT: that assume it is used only from ;; CHECK-NEXT: JS -;; CHECK-NEXT: -;; CHECK-NEXT: --fuzz-import a module to use as an import in +;; CHECK-EMPTY: +;; CHECK-NEXT: --fuzz-import a module to use as an import in ;; CHECK-NEXT: -ttf mode -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-spec-wrapper,-esw Emit a wasm spec interpreter -;; CHECK-NEXT: wrapper file that can run the -;; CHECK-NEXT: wasm with some test values, +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-spec-wrapper,-esw Emit a wasm spec interpreter +;; CHECK-NEXT: wrapper file that can run the +;; CHECK-NEXT: wasm with some test values, ;; CHECK-NEXT: useful for fuzzing -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-wasm2c-wrapper,-esw Emit a C wrapper file that can -;; CHECK-NEXT: run the wasm after it is +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-wasm2c-wrapper,-esw Emit a C wrapper file that can +;; CHECK-NEXT: run the wasm after it is ;; CHECK-NEXT: compiled with wasm2c, useful for ;; CHECK-NEXT: fuzzing -;; CHECK-NEXT: -;; CHECK-NEXT: --input-source-map,-ism Consume source map from the +;; CHECK-EMPTY: +;; CHECK-NEXT: --input-source-map,-ism Consume source map from the ;; CHECK-NEXT: specified file -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output-source-map,-osm Emit source map to the specified ;; CHECK-NEXT: file -;; CHECK-NEXT: -;; CHECK-NEXT: --output-source-map-url,-osu Emit specified string as source +;; CHECK-EMPTY: +;; CHECK-NEXT: --output-source-map-url,-osu Emit specified string as source ;; CHECK-NEXT: map URL -;; CHECK-NEXT: -;; CHECK-NEXT: --experimental-new-eh Deprecated; same as +;; CHECK-EMPTY: +;; CHECK-NEXT: --experimental-new-eh Deprecated; same as ;; CHECK-NEXT: --emit-exnref -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-exnref After running all requested +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-exnref After running all requested ;; CHECK-NEXT: transformations / optimizations, ;; CHECK-NEXT: translate the instruction to use -;; CHECK-NEXT: the new EH instructions at the -;; CHECK-NEXT: end. Depending on the -;; CHECK-NEXT: optimization level specified, -;; CHECK-NEXT: this may do some more +;; CHECK-NEXT: the new EH instructions at the +;; CHECK-NEXT: end. Depending on the +;; CHECK-NEXT: optimization level specified, +;; CHECK-NEXT: this may do some more ;; CHECK-NEXT: post-translation optimizations. -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Optimization passes: ;; CHECK-NEXT: -------------------- -;; CHECK-NEXT: -;; CHECK-NEXT: --abstract-type-refining refine and merge abstract +;; CHECK-EMPTY: +;; CHECK-NEXT: --abstract-type-refining refine and merge abstract ;; CHECK-NEXT: (never-created) types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --alignment-lowering lower unaligned loads and stores ;; CHECK-NEXT: to smaller aligned ones -;; CHECK-NEXT: -;; CHECK-NEXT: --asyncify async/await style transform, +;; CHECK-EMPTY: +;; CHECK-NEXT: --asyncify async/await style transform, ;; CHECK-NEXT: allowing pausing and resuming -;; CHECK-NEXT: -;; CHECK-NEXT: --avoid-reinterprets Tries to avoid reinterpret +;; CHECK-EMPTY: +;; CHECK-NEXT: --avoid-reinterprets Tries to avoid reinterpret ;; CHECK-NEXT: operations via more loads -;; CHECK-NEXT: -;; CHECK-NEXT: --cfp propagate constant struct field +;; CHECK-EMPTY: +;; CHECK-NEXT: --cfp propagate constant struct field ;; CHECK-NEXT: values -;; CHECK-NEXT: -;; CHECK-NEXT: --cfp-reftest propagate constant struct field +;; CHECK-EMPTY: +;; CHECK-NEXT: --cfp-reftest propagate constant struct field ;; CHECK-NEXT: values, using ref.test -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --coalesce-locals reduce # of locals by coalescing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --coalesce-locals-learning reduce # of locals by coalescing ;; CHECK-NEXT: and learning -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --code-folding fold code, merging duplicates -;; CHECK-NEXT: -;; CHECK-NEXT: --code-pushing push code forward, potentially +;; CHECK-EMPTY: +;; CHECK-NEXT: --code-pushing push code forward, potentially ;; CHECK-NEXT: making it not always execute -;; CHECK-NEXT: -;; CHECK-NEXT: --const-hoisting hoist repeated constants to a +;; CHECK-EMPTY: +;; CHECK-NEXT: --const-hoisting hoist repeated constants to a ;; CHECK-NEXT: local -;; CHECK-NEXT: -;; CHECK-NEXT: --constraint-analysis finds and uses mathematical +;; CHECK-EMPTY: +;; CHECK-NEXT: --constraint-analysis finds and uses mathematical ;; CHECK-NEXT: constraints on locals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dae removes arguments to calls in an ;; CHECK-NEXT: lto-like manner -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dae-optimizing removes arguments to calls in an -;; CHECK-NEXT: lto-like manner, and optimizes +;; CHECK-NEXT: lto-like manner, and optimizes ;; CHECK-NEXT: where we removed -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dae2 Experimental reimplementation of ;; CHECK-NEXT: DAE -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dce removes unreachable code -;; CHECK-NEXT: -;; CHECK-NEXT: --dealign forces all loads and stores to +;; CHECK-EMPTY: +;; CHECK-NEXT: --dealign forces all loads and stores to ;; CHECK-NEXT: have alignment 1 -;; CHECK-NEXT: -;; CHECK-NEXT: --denan instrument the wasm to convert +;; CHECK-EMPTY: +;; CHECK-NEXT: --denan instrument the wasm to convert ;; CHECK-NEXT: NaNs into 0 at runtime -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dfo optimizes using the DataFlow SSA ;; CHECK-NEXT: IR -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --directize turns indirect calls into direct ;; CHECK-NEXT: ones -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --discard-global-effects discards global effect info -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --duplicate-function-elimination removes duplicate functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --duplicate-import-elimination removes duplicate imports -;; CHECK-NEXT: -;; CHECK-NEXT: --dwarfdump dump DWARF debug info sections +;; CHECK-EMPTY: +;; CHECK-NEXT: --dwarfdump dump DWARF debug info sections ;; CHECK-NEXT: from the read binary -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --emit-target-features emit the target features section ;; CHECK-NEXT: in the output -;; CHECK-NEXT: -;; CHECK-NEXT: --enclose-world modify the wasm (destructively) +;; CHECK-EMPTY: +;; CHECK-NEXT: --enclose-world modify the wasm (destructively) ;; CHECK-NEXT: for closed-world -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --extract-function leaves just one function (useful ;; CHECK-NEXT: for debugging) -;; CHECK-NEXT: -;; CHECK-NEXT: --extract-function-index leaves just one function +;; CHECK-EMPTY: +;; CHECK-NEXT: --extract-function-index leaves just one function ;; CHECK-NEXT: selected by index -;; CHECK-NEXT: -;; CHECK-NEXT: --flatten flattens out code, removing +;; CHECK-EMPTY: +;; CHECK-NEXT: --flatten flattens out code, removing ;; CHECK-NEXT: nesting -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --fpcast-emu emulates function pointer casts, -;; CHECK-NEXT: allowing incorrect indirect +;; CHECK-NEXT: allowing incorrect indirect ;; CHECK-NEXT: calls to (sometimes) work -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --func-metrics reports function metrics -;; CHECK-NEXT: -;; CHECK-NEXT: --generate-dyncalls generate dynCall functions used +;; CHECK-EMPTY: +;; CHECK-NEXT: --generate-dyncalls generate dynCall functions used ;; CHECK-NEXT: by emscripten ABI -;; CHECK-NEXT: -;; CHECK-NEXT: --generate-global-effects generate global effect info +;; CHECK-EMPTY: +;; CHECK-NEXT: --generate-global-effects generate global effect info ;; CHECK-NEXT: (helps later passes) -;; CHECK-NEXT: -;; CHECK-NEXT: --generate-i64-dyncalls generate dynCall functions used -;; CHECK-NEXT: by emscripten ABI, but only for -;; CHECK-NEXT: functions with i64 in their -;; CHECK-NEXT: signature (which cannot be -;; CHECK-NEXT: invoked via the wasm table -;; CHECK-NEXT: without JavaScript BigInt +;; CHECK-EMPTY: +;; CHECK-NEXT: --generate-i64-dyncalls generate dynCall functions used +;; CHECK-NEXT: by emscripten ABI, but only for +;; CHECK-NEXT: functions with i64 in their +;; CHECK-NEXT: signature (which cannot be +;; CHECK-NEXT: invoked via the wasm table +;; CHECK-NEXT: without JavaScript BigInt ;; CHECK-NEXT: support). -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --global-refining refine the types of globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --gsi globally optimize struct values -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --gsi-desc-cast globally optimize struct values, ;; CHECK-NEXT: also emitting ref.cast_desc_eq -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --gto globally optimize GC types -;; CHECK-NEXT: -;; CHECK-NEXT: --gufa Grand Unified Flow Analysis: -;; CHECK-NEXT: optimize the entire program -;; CHECK-NEXT: using information about what -;; CHECK-NEXT: content can actually appear in +;; CHECK-EMPTY: +;; CHECK-NEXT: --gufa Grand Unified Flow Analysis: +;; CHECK-NEXT: optimize the entire program +;; CHECK-NEXT: using information about what +;; CHECK-NEXT: content can actually appear in ;; CHECK-NEXT: each location -;; CHECK-NEXT: -;; CHECK-NEXT: --gufa-cast-all GUFA plus add casts for all +;; CHECK-EMPTY: +;; CHECK-NEXT: --gufa-cast-all GUFA plus add casts for all ;; CHECK-NEXT: inferences -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --gufa-optimizing GUFA plus local optimizations in ;; CHECK-NEXT: functions we modified -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --heap-store-optimization optimize heap (GC) stores -;; CHECK-NEXT: -;; CHECK-NEXT: --heap2local replace GC allocations with +;; CHECK-EMPTY: +;; CHECK-NEXT: --heap2local replace GC allocations with ;; CHECK-NEXT: locals -;; CHECK-NEXT: -;; CHECK-NEXT: --i64-to-i32-lowering lower all uses of i64s to use +;; CHECK-EMPTY: +;; CHECK-NEXT: --i64-to-i32-lowering lower all uses of i64s to use ;; CHECK-NEXT: i32s instead -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --inline-main inline __original_main into main -;; CHECK-NEXT: -;; CHECK-NEXT: --inlining inline functions (you probably +;; CHECK-EMPTY: +;; CHECK-NEXT: --inlining inline functions (you probably ;; CHECK-NEXT: want inlining-optimizing) -;; CHECK-NEXT: -;; CHECK-NEXT: --inlining-optimizing inline functions and optimizes +;; CHECK-EMPTY: +;; CHECK-NEXT: --inlining-optimizing inline functions and optimizes ;; CHECK-NEXT: where we inlined -;; CHECK-NEXT: -;; CHECK-NEXT: --instrument-branch-hints instrument branch hints so we +;; CHECK-EMPTY: +;; CHECK-NEXT: --instrument-branch-hints instrument branch hints so we ;; CHECK-NEXT: can see which guessed right -;; CHECK-NEXT: -;; CHECK-NEXT: --instrument-locals instrument the build with code -;; CHECK-NEXT: to intercept all loads and +;; CHECK-EMPTY: +;; CHECK-NEXT: --instrument-locals instrument the build with code +;; CHECK-NEXT: to intercept all loads and ;; CHECK-NEXT: stores -;; CHECK-NEXT: -;; CHECK-NEXT: --instrument-memory instrument the build with code -;; CHECK-NEXT: to intercept all loads and +;; CHECK-EMPTY: +;; CHECK-NEXT: --instrument-memory instrument the build with code +;; CHECK-NEXT: to intercept all loads and ;; CHECK-NEXT: stores -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --intrinsic-lowering lower away binaryen intrinsics -;; CHECK-NEXT: -;; CHECK-NEXT: --legalize-and-prune-js-interface legalizes the import/export +;; CHECK-EMPTY: +;; CHECK-NEXT: --legalize-and-prune-js-interface legalizes the import/export ;; CHECK-NEXT: boundary and prunes when needed -;; CHECK-NEXT: -;; CHECK-NEXT: --legalize-js-interface legalizes i64 types on the +;; CHECK-EMPTY: +;; CHECK-NEXT: --legalize-js-interface legalizes i64 types on the ;; CHECK-NEXT: import/export boundary -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --licm loop invariant code motion -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --limit-segments attempt to merge segments to fit ;; CHECK-NEXT: within web limits -;; CHECK-NEXT: -;; CHECK-NEXT: --llvm-memory-copy-fill-lowering Lower memory.copy and -;; CHECK-NEXT: memory.fill to wasm mvp and +;; CHECK-EMPTY: +;; CHECK-NEXT: --llvm-memory-copy-fill-lowering Lower memory.copy and +;; CHECK-NEXT: memory.fill to wasm mvp and ;; CHECK-NEXT: disable the bulk-memory feature. -;; CHECK-NEXT: -;; CHECK-NEXT: --llvm-nontrapping-fptoint-lowering lower nontrapping float-to-int -;; CHECK-NEXT: operations to wasm mvp and -;; CHECK-NEXT: disable the nontrapping fptoint +;; CHECK-EMPTY: +;; CHECK-NEXT: --llvm-nontrapping-fptoint-lowering lower nontrapping float-to-int +;; CHECK-NEXT: operations to wasm mvp and +;; CHECK-NEXT: disable the nontrapping fptoint ;; CHECK-NEXT: feature -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --local-cse common subexpression elimination ;; CHECK-NEXT: inside basic blocks -;; CHECK-NEXT: -;; CHECK-NEXT: --local-subtyping apply more specific subtypes to +;; CHECK-EMPTY: +;; CHECK-NEXT: --local-subtyping apply more specific subtypes to ;; CHECK-NEXT: locals where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --log-execution instrument the build with +;; CHECK-EMPTY: +;; CHECK-NEXT: --log-execution instrument the build with ;; CHECK-NEXT: logging of where execution goes -;; CHECK-NEXT: -;; CHECK-NEXT: --make-shared-objects Make structs and arrays shared +;; CHECK-EMPTY: +;; CHECK-NEXT: --make-shared-objects Make structs and arrays shared ;; CHECK-NEXT: and functions unshared -;; CHECK-NEXT: -;; CHECK-NEXT: --mark-js-called mark js called functions (using +;; CHECK-EMPTY: +;; CHECK-NEXT: --mark-js-called mark js called functions (using ;; CHECK-NEXT: configureAll) as doing so -;; CHECK-NEXT: -;; CHECK-NEXT: --memory-packing packs memory into separate +;; CHECK-EMPTY: +;; CHECK-NEXT: --memory-packing packs memory into separate ;; CHECK-NEXT: segments, skipping zeros -;; CHECK-NEXT: -;; CHECK-NEXT: --memory64-lowering lower loads and stores to a -;; CHECK-NEXT: 64-bit memory to instead use a +;; CHECK-EMPTY: +;; CHECK-NEXT: --memory64-lowering lower loads and stores to a +;; CHECK-NEXT: 64-bit memory to instead use a ;; CHECK-NEXT: 32-bit one -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --merge-blocks merges blocks to their parents -;; CHECK-NEXT: -;; CHECK-NEXT: --merge-j2cl-itables Merges itable structures into -;; CHECK-NEXT: vtables to make types more +;; CHECK-EMPTY: +;; CHECK-NEXT: --merge-j2cl-itables Merges itable structures into +;; CHECK-NEXT: vtables to make types more ;; CHECK-NEXT: compact -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --merge-locals merges locals when beneficial -;; CHECK-NEXT: -;; CHECK-NEXT: --merge-similar-functions merges similar functions when +;; CHECK-EMPTY: +;; CHECK-NEXT: --merge-similar-functions merges similar functions when ;; CHECK-NEXT: benefical -;; CHECK-NEXT: -;; CHECK-NEXT: --metrics reports metrics (with an -;; CHECK-NEXT: optional title, +;; CHECK-EMPTY: +;; CHECK-NEXT: --metrics reports metrics (with an +;; CHECK-NEXT: optional title, ;; CHECK-NEXT: --metrics[=TITLE]) -;; CHECK-NEXT: -;; CHECK-NEXT: --minify-imports minifies import names (only -;; CHECK-NEXT: those, and not export names), -;; CHECK-NEXT: and emits a mapping to the +;; CHECK-EMPTY: +;; CHECK-NEXT: --minify-imports minifies import names (only +;; CHECK-NEXT: those, and not export names), +;; CHECK-NEXT: and emits a mapping to the ;; CHECK-NEXT: minified ones -;; CHECK-NEXT: -;; CHECK-NEXT: --minify-imports-and-exports minifies both import and export -;; CHECK-NEXT: names, and emits a mapping to +;; CHECK-EMPTY: +;; CHECK-NEXT: --minify-imports-and-exports minifies both import and export +;; CHECK-NEXT: names, and emits a mapping to ;; CHECK-NEXT: the minified ones -;; CHECK-NEXT: -;; CHECK-NEXT: --minify-imports-and-exports-and-modules minifies both import and export -;; CHECK-NEXT: names, and emits a mapping to -;; CHECK-NEXT: the minified ones, and minifies +;; CHECK-EMPTY: +;; CHECK-NEXT: --minify-imports-and-exports-and-modules minifies both import and export +;; CHECK-NEXT: names, and emits a mapping to +;; CHECK-NEXT: the minified ones, and minifies ;; CHECK-NEXT: the modules as well -;; CHECK-NEXT: -;; CHECK-NEXT: --minimize-rec-groups Split types into minimal +;; CHECK-EMPTY: +;; CHECK-NEXT: --minimize-rec-groups Split types into minimal ;; CHECK-NEXT: recursion groups -;; CHECK-NEXT: -;; CHECK-NEXT: --monomorphize creates specialized versions of +;; CHECK-EMPTY: +;; CHECK-NEXT: --monomorphize creates specialized versions of ;; CHECK-NEXT: functions -;; CHECK-NEXT: -;; CHECK-NEXT: --monomorphize-always creates specialized versions of +;; CHECK-EMPTY: +;; CHECK-NEXT: --monomorphize-always creates specialized versions of ;; CHECK-NEXT: functions (even if unhelpful) -;; CHECK-NEXT: -;; CHECK-NEXT: --multi-memory-lowering combines multiple memories into +;; CHECK-EMPTY: +;; CHECK-NEXT: --multi-memory-lowering combines multiple memories into ;; CHECK-NEXT: a single memory -;; CHECK-NEXT: -;; CHECK-NEXT: --multi-memory-lowering-with-bounds-checks combines multiple memories into +;; CHECK-EMPTY: +;; CHECK-NEXT: --multi-memory-lowering-with-bounds-checks combines multiple memories into ;; CHECK-NEXT: a single memory, trapping if the ;; CHECK-NEXT: read or write is larger than the ;; CHECK-NEXT: length of the memory's data -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --name-types (re)name all heap types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --nm name list -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --no-full-inline mark functions as no-inline (for ;; CHECK-NEXT: full inlining only) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --no-inline mark functions as no-inline -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --no-partial-inline mark functions as no-inline (for ;; CHECK-NEXT: partial inlining only) -;; CHECK-NEXT: -;; CHECK-NEXT: --once-reduction reduces calls to code that only +;; CHECK-EMPTY: +;; CHECK-NEXT: --once-reduction reduces calls to code that only ;; CHECK-NEXT: runs once -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-added-constants optimizes added constants into +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-added-constants optimizes added constants into ;; CHECK-NEXT: load/store offsets -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-added-constants-propagate optimizes added constants into -;; CHECK-NEXT: load/store offsets, propagating +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-added-constants-propagate optimizes added constants into +;; CHECK-NEXT: load/store offsets, propagating ;; CHECK-NEXT: them across locals too -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-casts eliminate and reuse casts -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-for-js early optimize of the +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-for-js early optimize of the ;; CHECK-NEXT: instruction combinations for js -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-instructions optimizes instruction +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-instructions optimizes instruction ;; CHECK-NEXT: combinations -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-j2cl optimizes J2CL specific +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-j2cl optimizes J2CL specific ;; CHECK-NEXT: constructs. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --outlining outline instructions -;; CHECK-NEXT: -;; CHECK-NEXT: --pick-load-signs pick load signs based on their +;; CHECK-EMPTY: +;; CHECK-NEXT: --pick-load-signs pick load signs based on their ;; CHECK-NEXT: uses -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --poppify Transform Binaryen IR into Poppy ;; CHECK-NEXT: IR -;; CHECK-NEXT: -;; CHECK-NEXT: --post-emscripten miscellaneous optimizations for +;; CHECK-EMPTY: +;; CHECK-NEXT: --post-emscripten miscellaneous optimizations for ;; CHECK-NEXT: Emscripten-generated code -;; CHECK-NEXT: -;; CHECK-NEXT: --precompute computes compile-time +;; CHECK-EMPTY: +;; CHECK-NEXT: --precompute computes compile-time ;; CHECK-NEXT: evaluatable expressions -;; CHECK-NEXT: -;; CHECK-NEXT: --precompute-propagate computes compile-time -;; CHECK-NEXT: evaluatable expressions and +;; CHECK-EMPTY: +;; CHECK-NEXT: --precompute-propagate computes compile-time +;; CHECK-NEXT: evaluatable expressions and ;; CHECK-NEXT: propagates them through locals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print print in s-expression format -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-boundary print boundary in JSON format -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-call-graph print call graph -;; CHECK-NEXT: -;; CHECK-NEXT: --print-features print options for enabled +;; CHECK-EMPTY: +;; CHECK-NEXT: --print-features print options for enabled ;; CHECK-NEXT: features -;; CHECK-NEXT: -;; CHECK-NEXT: --print-full print in full s-expression +;; CHECK-EMPTY: +;; CHECK-NEXT: --print-full print in full s-expression ;; CHECK-NEXT: format -;; CHECK-NEXT: -;; CHECK-NEXT: --print-function-map print a map of function indexes +;; CHECK-EMPTY: +;; CHECK-NEXT: --print-function-map print a map of function indexes ;; CHECK-NEXT: to names -;; CHECK-NEXT: -;; CHECK-NEXT: --print-minified print in minified s-expression +;; CHECK-EMPTY: +;; CHECK-NEXT: --print-minified print in minified s-expression ;; CHECK-NEXT: format -;; CHECK-NEXT: -;; CHECK-NEXT: --propagate-debug-locs propagate debug location from -;; CHECK-NEXT: parents or previous siblings to +;; CHECK-EMPTY: +;; CHECK-NEXT: --propagate-debug-locs propagate debug location from +;; CHECK-NEXT: parents or previous siblings to ;; CHECK-NEXT: child nodes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --propagate-globals-globally propagate global values to other ;; CHECK-NEXT: globals (useful for tests) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --remove-exports removes exports using a wildcard -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-imports removes imports and replaces +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-imports removes imports and replaces ;; CHECK-NEXT: them with nops -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-memory removes memory init (legacy +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-memory removes memory init (legacy ;; CHECK-NEXT: name) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --remove-memory-init removes memory initialization -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-non-js-ops removes operations incompatible +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-non-js-ops removes operations incompatible ;; CHECK-NEXT: with js -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-relaxed-simd replaces relaxed SIMD +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-relaxed-simd replaces relaxed SIMD ;; CHECK-NEXT: instructions with unreachable -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-unused-brs removes breaks from locations +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-unused-brs removes breaks from locations ;; CHECK-NEXT: that are not needed -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --remove-unused-module-elements removes unused module elements -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-unused-names removes names from locations +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-unused-names removes names from locations ;; CHECK-NEXT: that are never branched to -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-unused-nonfunction-module-elements removes unused module elements +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-unused-nonfunction-module-elements removes unused module elements ;; CHECK-NEXT: that are not functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --remove-unused-types remove unused private GC types -;; CHECK-NEXT: -;; CHECK-NEXT: --reorder-functions sorts functions by access +;; CHECK-EMPTY: +;; CHECK-NEXT: --reorder-functions sorts functions by access ;; CHECK-NEXT: frequency -;; CHECK-NEXT: -;; CHECK-NEXT: --reorder-functions-by-name sorts functions by name (useful +;; CHECK-EMPTY: +;; CHECK-NEXT: --reorder-functions-by-name sorts functions by name (useful ;; CHECK-NEXT: for debugging) -;; CHECK-NEXT: -;; CHECK-NEXT: --reorder-globals sorts globals by access +;; CHECK-EMPTY: +;; CHECK-NEXT: --reorder-globals sorts globals by access ;; CHECK-NEXT: frequency -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --reorder-locals sorts locals by access frequency -;; CHECK-NEXT: -;; CHECK-NEXT: --reorder-types sorts private types by access +;; CHECK-EMPTY: +;; CHECK-NEXT: --reorder-types sorts private types by access ;; CHECK-NEXT: frequency -;; CHECK-NEXT: -;; CHECK-NEXT: --rereloop re-optimize control flow using +;; CHECK-EMPTY: +;; CHECK-NEXT: --rereloop re-optimize control flow using ;; CHECK-NEXT: the relooper algorithm -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --roundtrip write the module to binary, then ;; CHECK-NEXT: read it -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --rse remove redundant local.sets -;; CHECK-NEXT: -;; CHECK-NEXT: --safe-heap instrument loads and stores to +;; CHECK-EMPTY: +;; CHECK-NEXT: --safe-heap instrument loads and stores to ;; CHECK-NEXT: check for invalid behavior -;; CHECK-NEXT: -;; CHECK-NEXT: --separate-data-segments write data segments to a file +;; CHECK-EMPTY: +;; CHECK-NEXT: --separate-data-segments write data segments to a file ;; CHECK-NEXT: and strip them from the module -;; CHECK-NEXT: -;; CHECK-NEXT: --set-globals sets specified globals to +;; CHECK-EMPTY: +;; CHECK-NEXT: --set-globals sets specified globals to ;; CHECK-NEXT: specified values -;; CHECK-NEXT: -;; CHECK-NEXT: --signature-pruning remove params from function +;; CHECK-EMPTY: +;; CHECK-NEXT: --signature-pruning remove params from function ;; CHECK-NEXT: signature types where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --signature-refining apply more specific subtypes to +;; CHECK-EMPTY: +;; CHECK-NEXT: --signature-refining apply more specific subtypes to ;; CHECK-NEXT: signature types where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --signext-lowering lower sign-ext operations to -;; CHECK-NEXT: wasm mvp and disable the sign +;; CHECK-EMPTY: +;; CHECK-NEXT: --signext-lowering lower sign-ext operations to +;; CHECK-NEXT: wasm mvp and disable the sign ;; CHECK-NEXT: extension feature -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-globals miscellaneous globals-related +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-globals miscellaneous globals-related ;; CHECK-NEXT: optimizations -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-globals-optimizing miscellaneous globals-related -;; CHECK-NEXT: optimizations, and optimizes -;; CHECK-NEXT: where we replaced global.gets +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-globals-optimizing miscellaneous globals-related +;; CHECK-NEXT: optimizations, and optimizes +;; CHECK-NEXT: where we replaced global.gets ;; CHECK-NEXT: with constants -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals miscellaneous locals-related +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals miscellaneous locals-related ;; CHECK-NEXT: optimizations -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals-nonesting miscellaneous locals-related -;; CHECK-NEXT: optimizations (no nesting at +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals-nonesting miscellaneous locals-related +;; CHECK-NEXT: optimizations (no nesting at ;; CHECK-NEXT: all; preserves flatness) -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals-nostructure miscellaneous locals-related +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals-nostructure miscellaneous locals-related ;; CHECK-NEXT: optimizations (no structure) -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals-notee miscellaneous locals-related +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals-notee miscellaneous locals-related ;; CHECK-NEXT: optimizations (no tees) -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals-notee-nostructure miscellaneous locals-related -;; CHECK-NEXT: optimizations (no tees or +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals-notee-nostructure miscellaneous locals-related +;; CHECK-NEXT: optimizations (no tees or ;; CHECK-NEXT: structure) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --souperify emit Souper IR in text form -;; CHECK-NEXT: -;; CHECK-NEXT: --souperify-single-use emit Souper IR in text form +;; CHECK-EMPTY: +;; CHECK-NEXT: --souperify-single-use emit Souper IR in text form ;; CHECK-NEXT: (single-use nodes only) -;; CHECK-NEXT: -;; CHECK-NEXT: --spill-pointers spill pointers to the C stack +;; CHECK-EMPTY: +;; CHECK-NEXT: --spill-pointers spill pointers to the C stack ;; CHECK-NEXT: (useful for Boehm-style GC) -;; CHECK-NEXT: -;; CHECK-NEXT: --ssa ssa-ify variables so that they +;; CHECK-EMPTY: +;; CHECK-NEXT: --ssa ssa-ify variables so that they ;; CHECK-NEXT: have a single assignment -;; CHECK-NEXT: -;; CHECK-NEXT: --ssa-nomerge ssa-ify variables so that they -;; CHECK-NEXT: have a single assignment, +;; CHECK-EMPTY: +;; CHECK-NEXT: --ssa-nomerge ssa-ify variables so that they +;; CHECK-NEXT: have a single assignment, ;; CHECK-NEXT: ignoring merges -;; CHECK-NEXT: -;; CHECK-NEXT: --stack-check enforce limits on llvm's +;; CHECK-EMPTY: +;; CHECK-NEXT: --stack-check enforce limits on llvm's ;; CHECK-NEXT: __stack_pointer global -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --string-gathering gathers wasm strings to globals -;; CHECK-NEXT: -;; CHECK-NEXT: --string-lifting lift string imports to wasm +;; CHECK-EMPTY: +;; CHECK-NEXT: --string-lifting lift string imports to wasm ;; CHECK-NEXT: strings -;; CHECK-NEXT: -;; CHECK-NEXT: --string-lowering lowers wasm strings and +;; CHECK-EMPTY: +;; CHECK-NEXT: --string-lowering lowers wasm strings and ;; CHECK-NEXT: operations to imports -;; CHECK-NEXT: -;; CHECK-NEXT: --string-lowering-magic-imports same as string-lowering, but -;; CHECK-NEXT: encodes well-formed strings as +;; CHECK-EMPTY: +;; CHECK-NEXT: --string-lowering-magic-imports same as string-lowering, but +;; CHECK-NEXT: encodes well-formed strings as ;; CHECK-NEXT: magic imports -;; CHECK-NEXT: -;; CHECK-NEXT: --string-lowering-magic-imports-assert same as -;; CHECK-NEXT: string-lowering-magic-imports, +;; CHECK-EMPTY: +;; CHECK-NEXT: --string-lowering-magic-imports-assert same as +;; CHECK-NEXT: string-lowering-magic-imports, ;; CHECK-NEXT: but raise a fatal error if there ;; CHECK-NEXT: are invalid strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --strip deprecated; same as strip-debug -;; CHECK-NEXT: -;; CHECK-NEXT: --strip-debug strip debug info (including the +;; CHECK-EMPTY: +;; CHECK-NEXT: --strip-debug strip debug info (including the ;; CHECK-NEXT: names section) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --strip-dwarf strip dwarf debug info -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --strip-eh strip EH instructions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --strip-producers strip the wasm producers section -;; CHECK-NEXT: -;; CHECK-NEXT: --strip-target-features strip the wasm target features +;; CHECK-EMPTY: +;; CHECK-NEXT: --strip-target-features strip the wasm target features ;; CHECK-NEXT: section -;; CHECK-NEXT: -;; CHECK-NEXT: --strip-toolchain-annotations strip all toolchain-specific +;; CHECK-EMPTY: +;; CHECK-NEXT: --strip-toolchain-annotations strip all toolchain-specific ;; CHECK-NEXT: code annotations -;; CHECK-NEXT: -;; CHECK-NEXT: --stub-unsupported-js stub out unsupported JS +;; CHECK-EMPTY: +;; CHECK-NEXT: --stub-unsupported-js stub out unsupported JS ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --symbolmap (alias for print-function-map) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --table64-lowering alias for memory64-lowering -;; CHECK-NEXT: -;; CHECK-NEXT: --trace-calls instrument the build with code -;; CHECK-NEXT: to intercept specific function +;; CHECK-EMPTY: +;; CHECK-NEXT: --trace-calls instrument the build with code +;; CHECK-NEXT: to intercept specific function ;; CHECK-NEXT: calls -;; CHECK-NEXT: -;; CHECK-NEXT: --translate-to-exnref translate old Phase 3 EH -;; CHECK-NEXT: instructions to new ones with +;; CHECK-EMPTY: +;; CHECK-NEXT: --translate-to-exnref translate old Phase 3 EH +;; CHECK-NEXT: instructions to new ones with ;; CHECK-NEXT: exnref -;; CHECK-NEXT: -;; CHECK-NEXT: --translate-to-new-eh deprecated; same as +;; CHECK-EMPTY: +;; CHECK-NEXT: --translate-to-new-eh deprecated; same as ;; CHECK-NEXT: translate-to-exnref -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --trap-mode-clamp replace trapping operations with ;; CHECK-NEXT: clamping semantics -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --trap-mode-js replace trapping operations with ;; CHECK-NEXT: js semantics -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --tuple-optimization optimize trivial tuples away -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --type-finalizing mark all leaf types as final -;; CHECK-NEXT: -;; CHECK-NEXT: --type-merging merge types to their supertypes +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-merging merge types to their supertypes ;; CHECK-NEXT: where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --type-refining apply more specific subtypes to -;; CHECK-NEXT: type fields where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --type-refining-gufa apply more specific subtypes to +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-refining apply more specific subtypes to ;; CHECK-NEXT: type fields where possible +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-refining-gufa apply more specific subtypes to +;; CHECK-NEXT: type fields where possible ;; CHECK-NEXT: (using GUFA) -;; CHECK-NEXT: -;; CHECK-NEXT: --type-ssa create new types to help other +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-ssa create new types to help other ;; CHECK-NEXT: optimizations -;; CHECK-NEXT: -;; CHECK-NEXT: --type-unfinalizing mark all types as non-final +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-unfinalizing mark all types as non-final ;; CHECK-NEXT: (open) -;; CHECK-NEXT: -;; CHECK-NEXT: --unsubtyping removes unnecessary subtyping +;; CHECK-EMPTY: +;; CHECK-NEXT: --unsubtyping removes unnecessary subtyping ;; CHECK-NEXT: relationships -;; CHECK-NEXT: -;; CHECK-NEXT: --untee removes local.tees, replacing +;; CHECK-EMPTY: +;; CHECK-NEXT: --untee removes local.tees, replacing ;; CHECK-NEXT: them with sets and gets -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --vacuum removes obviously unneeded code -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Optimization options: ;; CHECK-NEXT: --------------------- -;; CHECK-NEXT: -;; CHECK-NEXT: -O execute default optimization +;; CHECK-EMPTY: +;; CHECK-NEXT: -O execute default optimization ;; CHECK-NEXT: passes (equivalent to -Os) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: -O0 execute no optimization passes -;; CHECK-NEXT: -;; CHECK-NEXT: -O1 execute -O1 optimization passes -;; CHECK-NEXT: (quick&useful opts, useful for +;; CHECK-EMPTY: +;; CHECK-NEXT: -O1 execute -O1 optimization passes +;; CHECK-NEXT: (quick&useful opts, useful for ;; CHECK-NEXT: iteration builds) -;; CHECK-NEXT: -;; CHECK-NEXT: -O2 execute -O2 optimization passes -;; CHECK-NEXT: (most opts, generally gets most +;; CHECK-EMPTY: +;; CHECK-NEXT: -O2 execute -O2 optimization passes +;; CHECK-NEXT: (most opts, generally gets most ;; CHECK-NEXT: perf) -;; CHECK-NEXT: -;; CHECK-NEXT: -O3 execute -O3 optimization passes -;; CHECK-NEXT: (spends potentially a lot of +;; CHECK-EMPTY: +;; CHECK-NEXT: -O3 execute -O3 optimization passes +;; CHECK-NEXT: (spends potentially a lot of ;; CHECK-NEXT: time optimizing) -;; CHECK-NEXT: -;; CHECK-NEXT: -O4 execute -O4 optimization passes -;; CHECK-NEXT: (also flatten the IR, which can +;; CHECK-EMPTY: +;; CHECK-NEXT: -O4 execute -O4 optimization passes +;; CHECK-NEXT: (also flatten the IR, which can ;; CHECK-NEXT: take a lot more time and memory, -;; CHECK-NEXT: but is useful on more nested / +;; CHECK-NEXT: but is useful on more nested / ;; CHECK-NEXT: complex / less-optimized input) -;; CHECK-NEXT: -;; CHECK-NEXT: -Os execute default optimization +;; CHECK-EMPTY: +;; CHECK-NEXT: -Os execute default optimization ;; CHECK-NEXT: passes, focusing on code size -;; CHECK-NEXT: -;; CHECK-NEXT: -Oz execute default optimization -;; CHECK-NEXT: passes, super-focusing on code +;; CHECK-EMPTY: +;; CHECK-NEXT: -Oz execute default optimization +;; CHECK-NEXT: passes, super-focusing on code ;; CHECK-NEXT: size -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-level,-ol How much to focus on optimizing +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-level,-ol How much to focus on optimizing ;; CHECK-NEXT: code -;; CHECK-NEXT: -;; CHECK-NEXT: --shrink-level,-s How much to focus on shrinking +;; CHECK-EMPTY: +;; CHECK-NEXT: --shrink-level,-s How much to focus on shrinking ;; CHECK-NEXT: code size -;; CHECK-NEXT: -;; CHECK-NEXT: --debuginfo,-g Emit names section in wasm -;; CHECK-NEXT: binary (or full debuginfo in +;; CHECK-EMPTY: +;; CHECK-NEXT: --debuginfo,-g Emit names section in wasm +;; CHECK-NEXT: binary (or full debuginfo in ;; CHECK-NEXT: wast) -;; CHECK-NEXT: -;; CHECK-NEXT: --always-inline-max-function-size,-aimfs Max size of functions that are +;; CHECK-EMPTY: +;; CHECK-NEXT: --always-inline-max-function-size,-aimfs Max size of functions that are ;; CHECK-NEXT: always inlined (default 2, which ;; CHECK-NEXT: is safe for use with -Os builds) -;; CHECK-NEXT: -;; CHECK-NEXT: --flexible-inline-max-function-size,-fimfs Max size of functions that are -;; CHECK-NEXT: inlined when lightweight (no -;; CHECK-NEXT: loops or function calls) when -;; CHECK-NEXT: optimizing aggressively for +;; CHECK-EMPTY: +;; CHECK-NEXT: --flexible-inline-max-function-size,-fimfs Max size of functions that are +;; CHECK-NEXT: inlined when lightweight (no +;; CHECK-NEXT: loops or function calls) when +;; CHECK-NEXT: optimizing aggressively for ;; CHECK-NEXT: speed (-O3). Default: 20 -;; CHECK-NEXT: -;; CHECK-NEXT: --one-caller-inline-max-function-size,-ocimfs Max size of functions that are -;; CHECK-NEXT: inlined when there is only one -;; CHECK-NEXT: caller (default -1, which means +;; CHECK-EMPTY: +;; CHECK-NEXT: --one-caller-inline-max-function-size,-ocimfs Max size of functions that are +;; CHECK-NEXT: inlined when there is only one +;; CHECK-NEXT: caller (default -1, which means ;; CHECK-NEXT: all such functions are inlined) -;; CHECK-NEXT: -;; CHECK-NEXT: --inline-max-combined-binary-size,-imcbs Max size of combined functions +;; CHECK-EMPTY: +;; CHECK-NEXT: --inline-max-combined-binary-size,-imcbs Max size of combined functions ;; CHECK-NEXT: after inlining. Default: 409600 -;; CHECK-NEXT: -;; CHECK-NEXT: --inline-functions-with-loops,-ifwl Allow inlining functions with +;; CHECK-EMPTY: +;; CHECK-NEXT: --inline-functions-with-loops,-ifwl Allow inlining functions with ;; CHECK-NEXT: loops -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --partial-inlining-ifs,-pii Number of ifs allowed in partial -;; CHECK-NEXT: inlining (zero means partial -;; CHECK-NEXT: inlining is disabled) (default: +;; CHECK-NEXT: inlining (zero means partial +;; CHECK-NEXT: inlining is disabled) (default: ;; CHECK-NEXT: 0) -;; CHECK-NEXT: -;; CHECK-NEXT: --ignore-implicit-traps,-iit Optimize under the helpful -;; CHECK-NEXT: assumption that no surprising +;; CHECK-EMPTY: +;; CHECK-NEXT: --ignore-implicit-traps,-iit Optimize under the helpful +;; CHECK-NEXT: assumption that no surprising ;; CHECK-NEXT: traps occur (from load, div/mod, ;; CHECK-NEXT: etc.) -;; CHECK-NEXT: -;; CHECK-NEXT: --traps-never-happen,-tnh Optimize under the helpful -;; CHECK-NEXT: assumption that no trap is -;; CHECK-NEXT: reached at runtime (from load, +;; CHECK-EMPTY: +;; CHECK-NEXT: --traps-never-happen,-tnh Optimize under the helpful +;; CHECK-NEXT: assumption that no trap is +;; CHECK-NEXT: reached at runtime (from load, ;; CHECK-NEXT: div/mod, etc.) -;; CHECK-NEXT: -;; CHECK-NEXT: --low-memory-unused,-lmu Optimize under the helpful -;; CHECK-NEXT: assumption that the low 1K of -;; CHECK-NEXT: memory is not used by the +;; CHECK-EMPTY: +;; CHECK-NEXT: --low-memory-unused,-lmu Optimize under the helpful +;; CHECK-NEXT: assumption that the low 1K of +;; CHECK-NEXT: memory is not used by the ;; CHECK-NEXT: application -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --fast-math,-ffm Optimize floats without handling -;; CHECK-NEXT: corner cases of NaNs and +;; CHECK-NEXT: corner cases of NaNs and ;; CHECK-NEXT: rounding -;; CHECK-NEXT: -;; CHECK-NEXT: --zero-filled-memory,-uim Assume that an imported memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --zero-filled-memory,-uim Assume that an imported memory ;; CHECK-NEXT: will be zero-initialized -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --skip-pass,-sp Skip a pass (do not run it) -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Tool options: ;; CHECK-NEXT: ------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --mvp-features,-mvp Disable all non-MVP features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --all-features,-all Enable all features -;; CHECK-NEXT: -;; CHECK-NEXT: --detect-features (deprecated - this flag does +;; CHECK-EMPTY: +;; CHECK-NEXT: --detect-features (deprecated - this flag does ;; CHECK-NEXT: nothing) -;; CHECK-NEXT: -;; CHECK-NEXT: --quiet,-q Emit less verbose output and +;; CHECK-EMPTY: +;; CHECK-NEXT: --quiet,-q Emit less verbose output and ;; CHECK-NEXT: hide trivial warnings. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for ;; CHECK-NEXT: testing purposes. -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-module-names Emit module names, even if not -;; CHECK-NEXT: emitting the rest of the names +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-module-names Emit module names, even if not +;; CHECK-NEXT: emitting the rest of the names ;; CHECK-NEXT: section. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-sign-ext Enable sign extension operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-sign-ext Disable sign extension +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-sign-ext Disable sign extension ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-threads Enable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-threads Disable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-mutable-globals Enable mutable globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-mutable-globals Disable mutable globals -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-simd Enable SIMD operations and types -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-simd Disable SIMD operations and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-simd Disable SIMD operations and ;; CHECK-NEXT: types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory Enable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory Disable bulk memory operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and ;; CHECK-NEXT: memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and ;; CHECK-NEXT: memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of -;; CHECK-NEXT: call-indirect (Ignored for -;; CHECK-NEXT: compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of +;; CHECK-NEXT: call-indirect (Ignored for +;; CHECK-NEXT: compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of -;; CHECK-NEXT: call-indirect (Ignored for -;; CHECK-NEXT: compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of +;; CHECK-NEXT: call-indirect (Ignored for +;; CHECK-NEXT: compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-exception-handling Enable exception handling +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-exception-handling Enable exception handling ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-exception-handling Disable exception handling +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-exception-handling Disable exception handling ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-tail-call Enable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-tail-call Disable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-reference-types Enable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-reference-types Disable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multivalue Enable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multivalue Disable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-gc Enable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-gc Disable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-memory64 Enable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-memory64 Disable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-simd Enable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-extended-const Enable extended const +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-extended-const Enable extended const ;; CHECK-NEXT: expressions -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-extended-const Disable extended const +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-extended-const Disable extended const ;; CHECK-NEXT: expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-strings Enable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-strings Disable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multimemory Enable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multimemory Disable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-stack-switching Enable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-stack-switching Disable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-shared-everything Enable shared-everything threads -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-shared-everything Disable shared-everything +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-shared-everything Disable shared-everything ;; CHECK-NEXT: threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-fp16 Enable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-fp16 Disable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) ;; CHECK-NEXT: and exact references -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors ;; CHECK-NEXT: (RTTs) and exact references -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multibyte Enable multibyte array loads and ;; CHECK-NEXT: stores -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads ;; CHECK-NEXT: and stores -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic ;; CHECK-NEXT: memory operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic ;; CHECK-NEXT: memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-page-sizes Enable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-custom-page-sizes Disable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-wide-arithmetic Enable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-wide-arithmetic Disable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-compact-imports Enable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-compact-imports Disable compact import section -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: -;; CHECK-NEXT: --no-validation,-n Disables validation, assumes +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-validation,-n Disables validation, assumes ;; CHECK-NEXT: inputs are correct -;; CHECK-NEXT: -;; CHECK-NEXT: --pass-arg,-pa An argument passed along to -;; CHECK-NEXT: optimization passes being run. -;; CHECK-NEXT: Must be in the form KEY@VALUE. -;; CHECK-NEXT: If KEY is the name of a pass -;; CHECK-NEXT: then it applies to the closest +;; CHECK-EMPTY: +;; CHECK-NEXT: --pass-arg,-pa An argument passed along to +;; CHECK-NEXT: optimization passes being run. +;; CHECK-NEXT: Must be in the form KEY@VALUE. +;; CHECK-NEXT: If KEY is the name of a pass +;; CHECK-NEXT: then it applies to the closest ;; CHECK-NEXT: instance of that pass before us. ;; CHECK-NEXT: If KEY is not the name of a pass -;; CHECK-NEXT: then it is a global option that -;; CHECK-NEXT: applies to all pass instances +;; CHECK-NEXT: then it is a global option that +;; CHECK-NEXT: applies to all pass instances ;; CHECK-NEXT: that read it. -;; CHECK-NEXT: -;; CHECK-NEXT: --closed-world,-cw Assume code outside of the -;; CHECK-NEXT: module does not inspect or -;; CHECK-NEXT: interact with GC and function -;; CHECK-NEXT: references, even if they are +;; CHECK-EMPTY: +;; CHECK-NEXT: --closed-world,-cw Assume code outside of the +;; CHECK-NEXT: module does not inspect or +;; CHECK-NEXT: interact with GC and function +;; CHECK-NEXT: references, even if they are ;; CHECK-NEXT: passed out. The outside may hold -;; CHECK-NEXT: on to them and pass them back -;; CHECK-NEXT: in, but not inspect their +;; CHECK-NEXT: on to them and pass them back +;; CHECK-NEXT: in, but not inspect their ;; CHECK-NEXT: contents or call them. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --preserve-type-order Preserve the order of types from -;; CHECK-NEXT: the input (useful for debugging +;; CHECK-NEXT: the input (useful for debugging ;; CHECK-NEXT: and testing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --generate-stack-ir generate StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-stack-ir optimize StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-stack-ir print StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --no-stack-ir do not use StackIR (even when it ;; CHECK-NEXT: is the default) -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: General options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: -;; CHECK-NEXT: --version Output version information and +;; CHECK-EMPTY: +;; CHECK-NEXT: --version Output version information and ;; CHECK-NEXT: exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: -;; CHECK-NEXT: --debug,-d Print debug information to +;; CHECK-EMPTY: +;; CHECK-NEXT: --debug,-d Print debug information to ;; CHECK-NEXT: stderr -;; CHECK-NEXT: +;; CHECK-EMPTY: diff --git a/test/lit/help/wasm-reduce.test b/test/lit/help/wasm-reduce.test index ce4dc9c11d7..20a2575a81e 100644 --- a/test/lit/help/wasm-reduce.test +++ b/test/lit/help/wasm-reduce.test @@ -1,13 +1,13 @@ ;; RUN: wasm-reduce --help | filecheck %s ;; CHECK: ================================================================================ ;; CHECK-NEXT: wasm-reduce INFILE -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Reduce a wasm file to a smaller one with the same behavior on a given command. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Typical usage: -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-reduce orig.wasm '--command=bash a.sh' --test t.wasm --working w.wasm -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: The original file orig.wasm is where we begin. We then repeatedly test a small ;; CHECK-NEXT: reduction of it by writing that modification to the 'test file' (specified by ;; CHECK-NEXT: '--test'), and we run the command, in this example 'bash a.sh'. That command @@ -18,21 +18,21 @@ ;; CHECK-NEXT: same stdout and the result return code. Each time reduction works we continue to ;; CHECK-NEXT: reduce from that point (and each time it fails, we go back and try something ;; CHECK-NEXT: else). -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: As mentioned above, the command should run on the test file. That is, the first ;; CHECK-NEXT: thing that wasm-reduce does on the example above is, effectively, -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: cp orig.wasm t.wasm ;; CHECK-NEXT: bash a.sh -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: In other words, it copies the original to the test file, and runs the command. ;; CHECK-NEXT: Whatever the command does, we will preserve as we copy progressively smaller ;; CHECK-NEXT: files to t.wasm. As we make progress, the smallest file will be written to ;; CHECK-NEXT: the working file, w.wasm, and when reduction is done you will find the final ;; CHECK-NEXT: result there. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Comparison to creduce: -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: 1. creduce requires the command to return 0. wasm-reduce is often used to reduce ;; CHECK-NEXT: crashes, which have non-zero return codes, so it is natural to allow any ;; CHECK-NEXT: return code. As mentioned above, we preserve the return code as we reduce. @@ -50,241 +50,241 @@ ;; CHECK-NEXT: the testcase is a combination of JavaScript and wasm). wasm-reduce runs the ;; CHECK-NEXT: command in the current directory (of course, your command can be a script ;; CHECK-NEXT: that changes directory to anywhere else). -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: More documentation can be found at -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: https://github.com/WebAssembly/binaryen/wiki/Fuzzing#reducing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: ================================================================================ -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-reduce options: ;; CHECK-NEXT: -------------------- -;; CHECK-NEXT: -;; CHECK-NEXT: --command,-cmd The command to run on the test, that we -;; CHECK-NEXT: want to reduce while keeping the -;; CHECK-NEXT: command's output identical. We look at +;; CHECK-EMPTY: +;; CHECK-NEXT: --command,-cmd The command to run on the test, that we +;; CHECK-NEXT: want to reduce while keeping the +;; CHECK-NEXT: command's output identical. We look at ;; CHECK-NEXT: the command's return code and stdout here -;; CHECK-NEXT: (TODO: stderr), and we reduce while +;; CHECK-NEXT: (TODO: stderr), and we reduce while ;; CHECK-NEXT: keeping those unchanged. -;; CHECK-NEXT: -;; CHECK-NEXT: --test,-t Test file (this will be written to test, -;; CHECK-NEXT: the given command should read it when we +;; CHECK-EMPTY: +;; CHECK-NEXT: --test,-t Test file (this will be written to test, +;; CHECK-NEXT: the given command should read it when we ;; CHECK-NEXT: call it) -;; CHECK-NEXT: -;; CHECK-NEXT: --working,-w Working file (this will contain the -;; CHECK-NEXT: current good state while doing temporary -;; CHECK-NEXT: computations, and will contain the final +;; CHECK-EMPTY: +;; CHECK-NEXT: --working,-w Working file (this will contain the +;; CHECK-NEXT: current good state while doing temporary +;; CHECK-NEXT: computations, and will contain the final ;; CHECK-NEXT: best result at the end) -;; CHECK-NEXT: -;; CHECK-NEXT: --binaries,-b binaryen binaries location (bin/ +;; CHECK-EMPTY: +;; CHECK-NEXT: --binaries,-b binaryen binaries location (bin/ ;; CHECK-NEXT: directory) -;; CHECK-NEXT: -;; CHECK-NEXT: --text,-S Emit intermediate files as text, instead -;; CHECK-NEXT: of binary (also make sure the test and -;; CHECK-NEXT: working files have a .wat or .wast +;; CHECK-EMPTY: +;; CHECK-NEXT: --text,-S Emit intermediate files as text, instead +;; CHECK-NEXT: of binary (also make sure the test and +;; CHECK-NEXT: working files have a .wat or .wast ;; CHECK-NEXT: suffix) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --denan Avoid nans when reducing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --verbose,-v Verbose output mode -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debugInfo,-g Keep debug info in binaries -;; CHECK-NEXT: -;; CHECK-NEXT: --force,-f Force the reduction attempt, ignoring -;; CHECK-NEXT: problems that imply it is unlikely to +;; CHECK-EMPTY: +;; CHECK-NEXT: --force,-f Force the reduction attempt, ignoring +;; CHECK-NEXT: problems that imply it is unlikely to ;; CHECK-NEXT: succeed -;; CHECK-NEXT: -;; CHECK-NEXT: --timeout,-to A timeout to apply to each execution of +;; CHECK-EMPTY: +;; CHECK-NEXT: --timeout,-to A timeout to apply to each execution of ;; CHECK-NEXT: the command, in seconds (default: 2) -;; CHECK-NEXT: -;; CHECK-NEXT: --extra-flags,-ef Extra commandline flags to pass to -;; CHECK-NEXT: wasm-opt while reducing. (default: +;; CHECK-EMPTY: +;; CHECK-NEXT: --extra-flags,-ef Extra commandline flags to pass to +;; CHECK-NEXT: wasm-opt while reducing. (default: ;; CHECK-NEXT: --enable-all) -;; CHECK-NEXT: -;; CHECK-NEXT: --save-all-working,-saw Save all intermediate working files, as +;; CHECK-EMPTY: +;; CHECK-NEXT: --save-all-working,-saw Save all intermediate working files, as ;; CHECK-NEXT: $WORKING.0, .1, .2 etc -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Tool options: ;; CHECK-NEXT: ------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --mvp-features,-mvp Disable all non-MVP features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --all-features,-all Enable all features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --detect-features (deprecated - this flag does nothing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --quiet,-q Emit less verbose output and hide trivial ;; CHECK-NEXT: warnings. -;; CHECK-NEXT: -;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing +;; CHECK-EMPTY: +;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing ;; CHECK-NEXT: purposes. -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting ;; CHECK-NEXT: the rest of the names section. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-sign-ext Enable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-sign-ext Disable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-threads Enable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-threads Disable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-mutable-globals Enable mutable globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-mutable-globals Disable mutable globals -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-simd Enable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-simd Disable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory Enable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory Disable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and memory.fill -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-exception-handling Enable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-exception-handling Disable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-tail-call Enable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-tail-call Disable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-reference-types Enable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-reference-types Disable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multivalue Enable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multivalue Disable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-gc Enable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-gc Disable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-memory64 Enable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-memory64 Disable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-simd Enable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-extended-const Enable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-extended-const Disable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-strings Enable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-strings Disable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multimemory Enable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multimemory Disable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-stack-switching Enable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-stack-switching Disable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-shared-everything Enable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-fp16 Enable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-fp16 Disable float 16 operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multibyte Enable multibyte array loads and stores -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads and stores -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-page-sizes Enable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-custom-page-sizes Disable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-wide-arithmetic Enable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-wide-arithmetic Disable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-compact-imports Enable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-compact-imports Disable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: -;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are ;; CHECK-NEXT: correct -;; CHECK-NEXT: -;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization -;; CHECK-NEXT: passes being run. Must be in the form -;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass -;; CHECK-NEXT: then it applies to the closest instance +;; CHECK-EMPTY: +;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization +;; CHECK-NEXT: passes being run. Must be in the form +;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass +;; CHECK-NEXT: then it applies to the closest instance ;; CHECK-NEXT: of that pass before us. If KEY is not the ;; CHECK-NEXT: name of a pass then it is a global option -;; CHECK-NEXT: that applies to all pass instances that +;; CHECK-NEXT: that applies to all pass instances that ;; CHECK-NEXT: read it. -;; CHECK-NEXT: -;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does -;; CHECK-NEXT: not inspect or interact with GC and -;; CHECK-NEXT: function references, even if they are -;; CHECK-NEXT: passed out. The outside may hold on to -;; CHECK-NEXT: them and pass them back in, but not +;; CHECK-EMPTY: +;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does +;; CHECK-NEXT: not inspect or interact with GC and +;; CHECK-NEXT: function references, even if they are +;; CHECK-NEXT: passed out. The outside may hold on to +;; CHECK-NEXT: them and pass them back in, but not ;; CHECK-NEXT: inspect their contents or call them. -;; CHECK-NEXT: -;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the +;; CHECK-EMPTY: +;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the ;; CHECK-NEXT: input (useful for debugging and testing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --generate-stack-ir generate StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-stack-ir optimize StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-stack-ir print StackIR during writing -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: General options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --version Output version information and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debug,-d Print debug information to stderr -;; CHECK-NEXT: +;; CHECK-EMPTY: diff --git a/test/lit/help/wasm-shell.test b/test/lit/help/wasm-shell.test index 8214c06f923..b9e01dad52a 100644 --- a/test/lit/help/wasm-shell.test +++ b/test/lit/help/wasm-shell.test @@ -1,17 +1,17 @@ ;; RUN: wasm-shell --help | filecheck %s ;; CHECK: ================================================================================ ;; CHECK-NEXT: wasm-shell INFILE -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Execute .wast files ;; CHECK-NEXT: ================================================================================ -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: General options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --version Output version information and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debug,-d Print debug information to stderr -;; CHECK-NEXT: +;; CHECK-EMPTY: diff --git a/test/lit/help/wasm-split.test b/test/lit/help/wasm-split.test index 9d8079ed283..542a8b3c382 100644 --- a/test/lit/help/wasm-split.test +++ b/test/lit/help/wasm-split.test @@ -1,339 +1,339 @@ ;; RUN: wasm-split --help | filecheck %s ;; CHECK: ================================================================================ ;; CHECK-NEXT: wasm-split INFILES -;; CHECK-NEXT: -;; CHECK-NEXT: Split a module into a primary module and a secondary module, or instrument a -;; CHECK-NEXT: module to gather a profile that can inform future splitting, or manage such +;; CHECK-EMPTY: +;; CHECK-NEXT: Split a module into a primary module and a secondary module, or instrument a +;; CHECK-NEXT: module to gather a profile that can inform future splitting, or manage such ;; CHECK-NEXT: profiles. Options that are only accepted in particular modes are marked with the ;; CHECK-NEXT: accepted "[]" in their descriptions. ;; CHECK-NEXT: ================================================================================ -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm-split options: ;; CHECK-NEXT: ------------------- -;; CHECK-NEXT: -;; CHECK-NEXT: --split Split an input module into two output +;; CHECK-EMPTY: +;; CHECK-NEXT: --split Split an input module into two output ;; CHECK-NEXT: modules. The default mode. -;; CHECK-NEXT: -;; CHECK-NEXT: --multi-split Split an input module into an arbitrary +;; CHECK-EMPTY: +;; CHECK-NEXT: --multi-split Split an input module into an arbitrary ;; CHECK-NEXT: number of output modules. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --instrument Instrument an input module to allow it to -;; CHECK-NEXT: generate a profile that can be used to +;; CHECK-NEXT: generate a profile that can be used to ;; CHECK-NEXT: guide splitting. -;; CHECK-NEXT: -;; CHECK-NEXT: --merge-profiles Merge multiple profiles for the same +;; CHECK-EMPTY: +;; CHECK-NEXT: --merge-profiles Merge multiple profiles for the same ;; CHECK-NEXT: module into a single profile. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-profile [print-profile] Print profile contents in ;; CHECK-NEXT: a human-readable format. -;; CHECK-NEXT: -;; CHECK-NEXT: --profile [split] The profile to use to guide +;; CHECK-EMPTY: +;; CHECK-NEXT: --profile [split] The profile to use to guide ;; CHECK-NEXT: splitting. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --keep-funcs [split] Comma-separated list of functions -;; CHECK-NEXT: to keep in the primary module. The rest -;; CHECK-NEXT: will be split out. Can be used alongside +;; CHECK-NEXT: to keep in the primary module. The rest +;; CHECK-NEXT: will be split out. Can be used alongside ;; CHECK-NEXT: --profile and --split-funcs. You can also ;; CHECK-NEXT: pass a file with one function per line by ;; CHECK-NEXT: passing @filename. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --split-funcs [split] Comma-separated list of functions ;; CHECK-NEXT: to split out to the secondary module. The -;; CHECK-NEXT: rest will be kept. Can be used alongside -;; CHECK-NEXT: --profile and --keep-funcs. This takes -;; CHECK-NEXT: precedence over other split options. You -;; CHECK-NEXT: can also pass a file with one function +;; CHECK-NEXT: rest will be kept. Can be used alongside +;; CHECK-NEXT: --profile and --keep-funcs. This takes +;; CHECK-NEXT: precedence over other split options. You +;; CHECK-NEXT: can also pass a file with one function ;; CHECK-NEXT: per line by passing @filename. -;; CHECK-NEXT: -;; CHECK-NEXT: --manifest [multi-split] File describing the -;; CHECK-NEXT: functions to be split into each module. -;; CHECK-NEXT: Each section separated by a blank line -;; CHECK-NEXT: begins with the base name of an output -;; CHECK-NEXT: module, which is followed by a list of -;; CHECK-NEXT: functions to place in that module, one +;; CHECK-EMPTY: +;; CHECK-NEXT: --manifest [multi-split] File describing the +;; CHECK-NEXT: functions to be split into each module. +;; CHECK-NEXT: Each section separated by a blank line +;; CHECK-NEXT: begins with the base name of an output +;; CHECK-NEXT: module, which is followed by a list of +;; CHECK-NEXT: functions to place in that module, one ;; CHECK-NEXT: per line. -;; CHECK-NEXT: -;; CHECK-NEXT: --out-prefix [multi-split] Prefix prepended to module -;; CHECK-NEXT: names in the manifest file to create +;; CHECK-EMPTY: +;; CHECK-NEXT: --out-prefix [multi-split] Prefix prepended to module +;; CHECK-NEXT: names in the manifest file to create ;; CHECK-NEXT: output file names. -;; CHECK-NEXT: -;; CHECK-NEXT: --primary-output,-o1 [split] Output file for the primary +;; CHECK-EMPTY: +;; CHECK-NEXT: --primary-output,-o1 [split] Output file for the primary ;; CHECK-NEXT: module. -;; CHECK-NEXT: -;; CHECK-NEXT: --secondary-output,-o2 [split] Output file for the secondary +;; CHECK-EMPTY: +;; CHECK-NEXT: --secondary-output,-o2 [split] Output file for the secondary ;; CHECK-NEXT: module. -;; CHECK-NEXT: -;; CHECK-NEXT: --symbolmap [split, multi-split] Write a symbol map +;; CHECK-EMPTY: +;; CHECK-NEXT: --symbolmap [split, multi-split] Write a symbol map ;; CHECK-NEXT: file for each of the output modules. -;; CHECK-NEXT: -;; CHECK-NEXT: --no-placeholders [split, multi-split] Do not import +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-placeholders [split, multi-split] Do not import ;; CHECK-NEXT: placeholder functions. Calls to secondary -;; CHECK-NEXT: functions will fail before the secondary +;; CHECK-NEXT: functions will fail before the secondary ;; CHECK-NEXT: module has been instantiated. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --placeholdermap [split, multi-split] Write a file mapping -;; CHECK-NEXT: placeholder indices to the function +;; CHECK-NEXT: placeholder indices to the function ;; CHECK-NEXT: names. -;; CHECK-NEXT: -;; CHECK-NEXT: --import-namespace [split, multi-split, instrument] When -;; CHECK-NEXT: provided as an option for module -;; CHECK-NEXT: splitting, the namespace from which to -;; CHECK-NEXT: import objects from the primary module -;; CHECK-NEXT: into the secondary module. In instrument -;; CHECK-NEXT: mode, refers to the namespace from which +;; CHECK-EMPTY: +;; CHECK-NEXT: --import-namespace [split, multi-split, instrument] When +;; CHECK-NEXT: provided as an option for module +;; CHECK-NEXT: splitting, the namespace from which to +;; CHECK-NEXT: import objects from the primary module +;; CHECK-NEXT: into the secondary module. In instrument +;; CHECK-NEXT: mode, refers to the namespace from which ;; CHECK-NEXT: to import the secondary memory, if any. -;; CHECK-NEXT: -;; CHECK-NEXT: --placeholder-namespace-prefix [split, multi-split] The prefix for the -;; CHECK-NEXT: namespaces from which to import -;; CHECK-NEXT: placeholder functions into the primary -;; CHECK-NEXT: module. The namespaces will be -;; CHECK-NEXT: concatenations of the prefix and the +;; CHECK-EMPTY: +;; CHECK-NEXT: --placeholder-namespace-prefix [split, multi-split] The prefix for the +;; CHECK-NEXT: namespaces from which to import +;; CHECK-NEXT: placeholder functions into the primary +;; CHECK-NEXT: module. The namespaces will be +;; CHECK-NEXT: concatenations of the prefix and the ;; CHECK-NEXT: module name. -;; CHECK-NEXT: -;; CHECK-NEXT: --placeholder-namespace [split, multi-split] The same as +;; CHECK-EMPTY: +;; CHECK-NEXT: --placeholder-namespace [split, multi-split] The same as ;; CHECK-NEXT: --placeholder-namespace-prefix. -;; CHECK-NEXT: -;; CHECK-NEXT: --export-prefix [split, multi-split] An identifying -;; CHECK-NEXT: prefix to prepend to new export names +;; CHECK-EMPTY: +;; CHECK-NEXT: --export-prefix [split, multi-split] An identifying +;; CHECK-NEXT: prefix to prepend to new export names ;; CHECK-NEXT: created by module splitting. -;; CHECK-NEXT: -;; CHECK-NEXT: --profile-export [instrument] The export name of the -;; CHECK-NEXT: function the embedder calls to write the -;; CHECK-NEXT: profile into memory. Defaults to +;; CHECK-EMPTY: +;; CHECK-NEXT: --profile-export [instrument] The export name of the +;; CHECK-NEXT: function the embedder calls to write the +;; CHECK-NEXT: profile into memory. Defaults to ;; CHECK-NEXT: `__write_profile`. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --in-memory [instrument] Store profile information in -;; CHECK-NEXT: memory (starting at address 0 and taking -;; CHECK-NEXT: one byte per function) rather than -;; CHECK-NEXT: globals (the default) so that it can be -;; CHECK-NEXT: shared between multiple threads. Users -;; CHECK-NEXT: are responsible for ensuring that the -;; CHECK-NEXT: module does not use the initial memory +;; CHECK-NEXT: memory (starting at address 0 and taking +;; CHECK-NEXT: one byte per function) rather than +;; CHECK-NEXT: globals (the default) so that it can be +;; CHECK-NEXT: shared between multiple threads. Users +;; CHECK-NEXT: are responsible for ensuring that the +;; CHECK-NEXT: module does not use the initial memory ;; CHECK-NEXT: region for anything else. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --in-secondary-memory [instrument] Store profile information in -;; CHECK-NEXT: a separate memory, rather than in module -;; CHECK-NEXT: main memory or globals (the default). -;; CHECK-NEXT: With this option, users do not need to -;; CHECK-NEXT: reserve the initial memory region for -;; CHECK-NEXT: profile data and the data can be shared +;; CHECK-NEXT: a separate memory, rather than in module +;; CHECK-NEXT: main memory or globals (the default). +;; CHECK-NEXT: With this option, users do not need to +;; CHECK-NEXT: reserve the initial memory region for +;; CHECK-NEXT: profile data and the data can be shared ;; CHECK-NEXT: between multiple threads. -;; CHECK-NEXT: -;; CHECK-NEXT: --secondary-memory-name [instrument] The name of the secondary -;; CHECK-NEXT: memory created to store profile +;; CHECK-EMPTY: +;; CHECK-NEXT: --secondary-memory-name [instrument] The name of the secondary +;; CHECK-NEXT: memory created to store profile ;; CHECK-NEXT: information. -;; CHECK-NEXT: -;; CHECK-NEXT: --initial-table [split, instrument] A hack to ensure the -;; CHECK-NEXT: split and instrumented modules have the -;; CHECK-NEXT: same table size when using Emscripten's -;; CHECK-NEXT: SPLIT_MODULE mode with dynamic linking. -;; CHECK-NEXT: TODO: Figure out a more elegant solution +;; CHECK-EMPTY: +;; CHECK-NEXT: --initial-table [split, instrument] A hack to ensure the +;; CHECK-NEXT: split and instrumented modules have the +;; CHECK-NEXT: same table size when using Emscripten's +;; CHECK-NEXT: SPLIT_MODULE mode with dynamic linking. +;; CHECK-NEXT: TODO: Figure out a more elegant solution ;; CHECK-NEXT: for that use case and remove this. -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-text,-S [split, multi-split, instrument] Emit -;; CHECK-NEXT: text instead of binary for the output +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-text,-S [split, multi-split, instrument] Emit +;; CHECK-NEXT: text instead of binary for the output ;; CHECK-NEXT: file or files. -;; CHECK-NEXT: -;; CHECK-NEXT: --debuginfo,-g [split, multi-split, instrument] Emit -;; CHECK-NEXT: names section in wasm binary (or full +;; CHECK-EMPTY: +;; CHECK-NEXT: --debuginfo,-g [split, multi-split, instrument] Emit +;; CHECK-NEXT: names section in wasm binary (or full ;; CHECK-NEXT: debuginfo in wast) -;; CHECK-NEXT: -;; CHECK-NEXT: --strip-debug [split, multi-split, instrument] Strip +;; CHECK-EMPTY: +;; CHECK-NEXT: --strip-debug [split, multi-split, instrument] Strip ;; CHECK-NEXT: debug info (including the names section) -;; CHECK-NEXT: -;; CHECK-NEXT: --traps-never-happen,-tnh [split, multi-split] Split under the -;; CHECK-NEXT: helpful assumption that no trap is -;; CHECK-NEXT: reached at runtime (from load, div/mod, +;; CHECK-EMPTY: +;; CHECK-NEXT: --traps-never-happen,-tnh [split, multi-split] Split under the +;; CHECK-NEXT: helpful assumption that no trap is +;; CHECK-NEXT: reached at runtime (from load, div/mod, ;; CHECK-NEXT: etc.) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --output,-o [instrument, merge-profiles, multi-split] ;; CHECK-NEXT: Output file. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --verbose,-v Verbose output mode. Prints the functions -;; CHECK-NEXT: that will be kept and split out when +;; CHECK-NEXT: that will be kept and split out when ;; CHECK-NEXT: splitting a module. -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Tool options: ;; CHECK-NEXT: ------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --mvp-features,-mvp Disable all non-MVP features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --all-features,-all Enable all features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --detect-features (deprecated - this flag does nothing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --quiet,-q Emit less verbose output and hide trivial ;; CHECK-NEXT: warnings. -;; CHECK-NEXT: -;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing +;; CHECK-EMPTY: +;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for testing ;; CHECK-NEXT: purposes. -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-module-names Emit module names, even if not emitting ;; CHECK-NEXT: the rest of the names section. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-sign-ext Enable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-sign-ext Disable sign extension operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-threads Enable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-threads Disable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-mutable-globals Enable mutable globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-mutable-globals Disable mutable globals -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-simd Enable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-simd Disable SIMD operations and types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory Enable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory Disable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and memory.fill -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect -;; CHECK-NEXT: (Ignored for compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of call-indirect +;; CHECK-NEXT: (Ignored for compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-exception-handling Enable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-exception-handling Disable exception handling operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-tail-call Enable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-tail-call Disable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-reference-types Enable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-reference-types Disable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multivalue Enable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multivalue Disable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-gc Enable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-gc Disable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-memory64 Enable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-memory64 Disable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-simd Enable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-extended-const Enable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-extended-const Disable extended const expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-strings Enable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-strings Disable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multimemory Enable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multimemory Disable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-stack-switching Enable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-stack-switching Disable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-shared-everything Enable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-fp16 Enable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-fp16 Disable float 16 operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors (RTTs) and ;; CHECK-NEXT: exact references -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multibyte Enable multibyte array loads and stores -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads and stores -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-page-sizes Enable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-custom-page-sizes Disable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-wide-arithmetic Enable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-wide-arithmetic Disable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-compact-imports Enable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-compact-imports Disable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: -;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-validation,-n Disables validation, assumes inputs are ;; CHECK-NEXT: correct -;; CHECK-NEXT: -;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization -;; CHECK-NEXT: passes being run. Must be in the form -;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass -;; CHECK-NEXT: then it applies to the closest instance +;; CHECK-EMPTY: +;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization +;; CHECK-NEXT: passes being run. Must be in the form +;; CHECK-NEXT: KEY@VALUE. If KEY is the name of a pass +;; CHECK-NEXT: then it applies to the closest instance ;; CHECK-NEXT: of that pass before us. If KEY is not the ;; CHECK-NEXT: name of a pass then it is a global option -;; CHECK-NEXT: that applies to all pass instances that +;; CHECK-NEXT: that applies to all pass instances that ;; CHECK-NEXT: read it. -;; CHECK-NEXT: -;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does -;; CHECK-NEXT: not inspect or interact with GC and -;; CHECK-NEXT: function references, even if they are -;; CHECK-NEXT: passed out. The outside may hold on to -;; CHECK-NEXT: them and pass them back in, but not +;; CHECK-EMPTY: +;; CHECK-NEXT: --closed-world,-cw Assume code outside of the module does +;; CHECK-NEXT: not inspect or interact with GC and +;; CHECK-NEXT: function references, even if they are +;; CHECK-NEXT: passed out. The outside may hold on to +;; CHECK-NEXT: them and pass them back in, but not ;; CHECK-NEXT: inspect their contents or call them. -;; CHECK-NEXT: -;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the +;; CHECK-EMPTY: +;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the ;; CHECK-NEXT: input (useful for debugging and testing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --generate-stack-ir generate StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-stack-ir optimize StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-stack-ir print StackIR during writing -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: General options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --version Output version information and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --debug,-d Print debug information to stderr -;; CHECK-NEXT: +;; CHECK-EMPTY: diff --git a/test/lit/help/wasm2js.test b/test/lit/help/wasm2js.test index d36cdb09410..da53bd71492 100644 --- a/test/lit/help/wasm2js.test +++ b/test/lit/help/wasm2js.test @@ -1,863 +1,863 @@ ;; RUN: wasm2js --help | filecheck %s ;; CHECK: ================================================================================ ;; CHECK-NEXT: wasm2js INFILE -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: Transform .wasm/.wat files to asm.js ;; CHECK-NEXT: ================================================================================ -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: wasm2js options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: -;; CHECK-NEXT: --output,-o Output file (stdout if not +;; CHECK-EMPTY: +;; CHECK-NEXT: --output,-o Output file (stdout if not ;; CHECK-NEXT: specified) -;; CHECK-NEXT: -;; CHECK-NEXT: --allow-asserts Allow compilation of .wast +;; CHECK-EMPTY: +;; CHECK-NEXT: --allow-asserts Allow compilation of .wast ;; CHECK-NEXT: testing asserts -;; CHECK-NEXT: -;; CHECK-NEXT: --pedantic Emulate WebAssembly trapping +;; CHECK-EMPTY: +;; CHECK-NEXT: --pedantic Emulate WebAssembly trapping ;; CHECK-NEXT: behavior -;; CHECK-NEXT: -;; CHECK-NEXT: --emscripten Emulate the glue in -;; CHECK-NEXT: emscripten-compatible form (and +;; CHECK-EMPTY: +;; CHECK-NEXT: --emscripten Emulate the glue in +;; CHECK-NEXT: emscripten-compatible form (and ;; CHECK-NEXT: not ES6 module form) -;; CHECK-NEXT: -;; CHECK-NEXT: --deterministic Replace WebAssembly trapping -;; CHECK-NEXT: behavior deterministically (the -;; CHECK-NEXT: default is to not care about -;; CHECK-NEXT: what would trap in wasm, like a -;; CHECK-NEXT: load out of bounds or integer -;; CHECK-NEXT: divide by zero; with this flag, -;; CHECK-NEXT: we try to be deterministic at -;; CHECK-NEXT: least in what happens, which -;; CHECK-NEXT: might or might not be to trap -;; CHECK-NEXT: like wasm, but at least should +;; CHECK-EMPTY: +;; CHECK-NEXT: --deterministic Replace WebAssembly trapping +;; CHECK-NEXT: behavior deterministically (the +;; CHECK-NEXT: default is to not care about +;; CHECK-NEXT: what would trap in wasm, like a +;; CHECK-NEXT: load out of bounds or integer +;; CHECK-NEXT: divide by zero; with this flag, +;; CHECK-NEXT: we try to be deterministic at +;; CHECK-NEXT: least in what happens, which +;; CHECK-NEXT: might or might not be to trap +;; CHECK-NEXT: like wasm, but at least should ;; CHECK-NEXT: not vary) -;; CHECK-NEXT: -;; CHECK-NEXT: --symbols-file Emit a symbols file that maps -;; CHECK-NEXT: function indexes to their +;; CHECK-EMPTY: +;; CHECK-NEXT: --symbols-file Emit a symbols file that maps +;; CHECK-NEXT: function indexes to their ;; CHECK-NEXT: original names -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Optimization passes: ;; CHECK-NEXT: -------------------- -;; CHECK-NEXT: -;; CHECK-NEXT: --abstract-type-refining refine and merge abstract +;; CHECK-EMPTY: +;; CHECK-NEXT: --abstract-type-refining refine and merge abstract ;; CHECK-NEXT: (never-created) types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --alignment-lowering lower unaligned loads and stores ;; CHECK-NEXT: to smaller aligned ones -;; CHECK-NEXT: -;; CHECK-NEXT: --asyncify async/await style transform, +;; CHECK-EMPTY: +;; CHECK-NEXT: --asyncify async/await style transform, ;; CHECK-NEXT: allowing pausing and resuming -;; CHECK-NEXT: -;; CHECK-NEXT: --avoid-reinterprets Tries to avoid reinterpret +;; CHECK-EMPTY: +;; CHECK-NEXT: --avoid-reinterprets Tries to avoid reinterpret ;; CHECK-NEXT: operations via more loads -;; CHECK-NEXT: -;; CHECK-NEXT: --cfp propagate constant struct field +;; CHECK-EMPTY: +;; CHECK-NEXT: --cfp propagate constant struct field ;; CHECK-NEXT: values -;; CHECK-NEXT: -;; CHECK-NEXT: --cfp-reftest propagate constant struct field +;; CHECK-EMPTY: +;; CHECK-NEXT: --cfp-reftest propagate constant struct field ;; CHECK-NEXT: values, using ref.test -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --coalesce-locals reduce # of locals by coalescing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --coalesce-locals-learning reduce # of locals by coalescing ;; CHECK-NEXT: and learning -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --code-folding fold code, merging duplicates -;; CHECK-NEXT: -;; CHECK-NEXT: --code-pushing push code forward, potentially +;; CHECK-EMPTY: +;; CHECK-NEXT: --code-pushing push code forward, potentially ;; CHECK-NEXT: making it not always execute -;; CHECK-NEXT: -;; CHECK-NEXT: --const-hoisting hoist repeated constants to a +;; CHECK-EMPTY: +;; CHECK-NEXT: --const-hoisting hoist repeated constants to a ;; CHECK-NEXT: local -;; CHECK-NEXT: -;; CHECK-NEXT: --constraint-analysis finds and uses mathematical +;; CHECK-EMPTY: +;; CHECK-NEXT: --constraint-analysis finds and uses mathematical ;; CHECK-NEXT: constraints on locals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dae removes arguments to calls in an ;; CHECK-NEXT: lto-like manner -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dae-optimizing removes arguments to calls in an -;; CHECK-NEXT: lto-like manner, and optimizes +;; CHECK-NEXT: lto-like manner, and optimizes ;; CHECK-NEXT: where we removed -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dae2 Experimental reimplementation of ;; CHECK-NEXT: DAE -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dce removes unreachable code -;; CHECK-NEXT: -;; CHECK-NEXT: --dealign forces all loads and stores to +;; CHECK-EMPTY: +;; CHECK-NEXT: --dealign forces all loads and stores to ;; CHECK-NEXT: have alignment 1 -;; CHECK-NEXT: -;; CHECK-NEXT: --denan instrument the wasm to convert +;; CHECK-EMPTY: +;; CHECK-NEXT: --denan instrument the wasm to convert ;; CHECK-NEXT: NaNs into 0 at runtime -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --dfo optimizes using the DataFlow SSA ;; CHECK-NEXT: IR -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --directize turns indirect calls into direct ;; CHECK-NEXT: ones -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --discard-global-effects discards global effect info -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --duplicate-function-elimination removes duplicate functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --duplicate-import-elimination removes duplicate imports -;; CHECK-NEXT: -;; CHECK-NEXT: --dwarfdump dump DWARF debug info sections +;; CHECK-EMPTY: +;; CHECK-NEXT: --dwarfdump dump DWARF debug info sections ;; CHECK-NEXT: from the read binary -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --emit-target-features emit the target features section ;; CHECK-NEXT: in the output -;; CHECK-NEXT: -;; CHECK-NEXT: --enclose-world modify the wasm (destructively) +;; CHECK-EMPTY: +;; CHECK-NEXT: --enclose-world modify the wasm (destructively) ;; CHECK-NEXT: for closed-world -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --extract-function leaves just one function (useful ;; CHECK-NEXT: for debugging) -;; CHECK-NEXT: -;; CHECK-NEXT: --extract-function-index leaves just one function +;; CHECK-EMPTY: +;; CHECK-NEXT: --extract-function-index leaves just one function ;; CHECK-NEXT: selected by index -;; CHECK-NEXT: -;; CHECK-NEXT: --flatten flattens out code, removing +;; CHECK-EMPTY: +;; CHECK-NEXT: --flatten flattens out code, removing ;; CHECK-NEXT: nesting -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --fpcast-emu emulates function pointer casts, -;; CHECK-NEXT: allowing incorrect indirect +;; CHECK-NEXT: allowing incorrect indirect ;; CHECK-NEXT: calls to (sometimes) work -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --func-metrics reports function metrics -;; CHECK-NEXT: -;; CHECK-NEXT: --generate-dyncalls generate dynCall functions used +;; CHECK-EMPTY: +;; CHECK-NEXT: --generate-dyncalls generate dynCall functions used ;; CHECK-NEXT: by emscripten ABI -;; CHECK-NEXT: -;; CHECK-NEXT: --generate-global-effects generate global effect info +;; CHECK-EMPTY: +;; CHECK-NEXT: --generate-global-effects generate global effect info ;; CHECK-NEXT: (helps later passes) -;; CHECK-NEXT: -;; CHECK-NEXT: --generate-i64-dyncalls generate dynCall functions used -;; CHECK-NEXT: by emscripten ABI, but only for -;; CHECK-NEXT: functions with i64 in their -;; CHECK-NEXT: signature (which cannot be -;; CHECK-NEXT: invoked via the wasm table -;; CHECK-NEXT: without JavaScript BigInt +;; CHECK-EMPTY: +;; CHECK-NEXT: --generate-i64-dyncalls generate dynCall functions used +;; CHECK-NEXT: by emscripten ABI, but only for +;; CHECK-NEXT: functions with i64 in their +;; CHECK-NEXT: signature (which cannot be +;; CHECK-NEXT: invoked via the wasm table +;; CHECK-NEXT: without JavaScript BigInt ;; CHECK-NEXT: support). -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --global-refining refine the types of globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --gsi globally optimize struct values -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --gsi-desc-cast globally optimize struct values, ;; CHECK-NEXT: also emitting ref.cast_desc_eq -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --gto globally optimize GC types -;; CHECK-NEXT: -;; CHECK-NEXT: --gufa Grand Unified Flow Analysis: -;; CHECK-NEXT: optimize the entire program -;; CHECK-NEXT: using information about what -;; CHECK-NEXT: content can actually appear in +;; CHECK-EMPTY: +;; CHECK-NEXT: --gufa Grand Unified Flow Analysis: +;; CHECK-NEXT: optimize the entire program +;; CHECK-NEXT: using information about what +;; CHECK-NEXT: content can actually appear in ;; CHECK-NEXT: each location -;; CHECK-NEXT: -;; CHECK-NEXT: --gufa-cast-all GUFA plus add casts for all +;; CHECK-EMPTY: +;; CHECK-NEXT: --gufa-cast-all GUFA plus add casts for all ;; CHECK-NEXT: inferences -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --gufa-optimizing GUFA plus local optimizations in ;; CHECK-NEXT: functions we modified -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --heap-store-optimization optimize heap (GC) stores -;; CHECK-NEXT: -;; CHECK-NEXT: --heap2local replace GC allocations with +;; CHECK-EMPTY: +;; CHECK-NEXT: --heap2local replace GC allocations with ;; CHECK-NEXT: locals -;; CHECK-NEXT: -;; CHECK-NEXT: --i64-to-i32-lowering lower all uses of i64s to use +;; CHECK-EMPTY: +;; CHECK-NEXT: --i64-to-i32-lowering lower all uses of i64s to use ;; CHECK-NEXT: i32s instead -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --inline-main inline __original_main into main -;; CHECK-NEXT: -;; CHECK-NEXT: --inlining inline functions (you probably +;; CHECK-EMPTY: +;; CHECK-NEXT: --inlining inline functions (you probably ;; CHECK-NEXT: want inlining-optimizing) -;; CHECK-NEXT: -;; CHECK-NEXT: --inlining-optimizing inline functions and optimizes +;; CHECK-EMPTY: +;; CHECK-NEXT: --inlining-optimizing inline functions and optimizes ;; CHECK-NEXT: where we inlined -;; CHECK-NEXT: -;; CHECK-NEXT: --instrument-branch-hints instrument branch hints so we +;; CHECK-EMPTY: +;; CHECK-NEXT: --instrument-branch-hints instrument branch hints so we ;; CHECK-NEXT: can see which guessed right -;; CHECK-NEXT: -;; CHECK-NEXT: --instrument-locals instrument the build with code -;; CHECK-NEXT: to intercept all loads and +;; CHECK-EMPTY: +;; CHECK-NEXT: --instrument-locals instrument the build with code +;; CHECK-NEXT: to intercept all loads and ;; CHECK-NEXT: stores -;; CHECK-NEXT: -;; CHECK-NEXT: --instrument-memory instrument the build with code -;; CHECK-NEXT: to intercept all loads and +;; CHECK-EMPTY: +;; CHECK-NEXT: --instrument-memory instrument the build with code +;; CHECK-NEXT: to intercept all loads and ;; CHECK-NEXT: stores -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --intrinsic-lowering lower away binaryen intrinsics -;; CHECK-NEXT: -;; CHECK-NEXT: --legalize-and-prune-js-interface legalizes the import/export +;; CHECK-EMPTY: +;; CHECK-NEXT: --legalize-and-prune-js-interface legalizes the import/export ;; CHECK-NEXT: boundary and prunes when needed -;; CHECK-NEXT: -;; CHECK-NEXT: --legalize-js-interface legalizes i64 types on the +;; CHECK-EMPTY: +;; CHECK-NEXT: --legalize-js-interface legalizes i64 types on the ;; CHECK-NEXT: import/export boundary -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --licm loop invariant code motion -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --limit-segments attempt to merge segments to fit ;; CHECK-NEXT: within web limits -;; CHECK-NEXT: -;; CHECK-NEXT: --llvm-memory-copy-fill-lowering Lower memory.copy and -;; CHECK-NEXT: memory.fill to wasm mvp and +;; CHECK-EMPTY: +;; CHECK-NEXT: --llvm-memory-copy-fill-lowering Lower memory.copy and +;; CHECK-NEXT: memory.fill to wasm mvp and ;; CHECK-NEXT: disable the bulk-memory feature. -;; CHECK-NEXT: -;; CHECK-NEXT: --llvm-nontrapping-fptoint-lowering lower nontrapping float-to-int -;; CHECK-NEXT: operations to wasm mvp and -;; CHECK-NEXT: disable the nontrapping fptoint +;; CHECK-EMPTY: +;; CHECK-NEXT: --llvm-nontrapping-fptoint-lowering lower nontrapping float-to-int +;; CHECK-NEXT: operations to wasm mvp and +;; CHECK-NEXT: disable the nontrapping fptoint ;; CHECK-NEXT: feature -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --local-cse common subexpression elimination ;; CHECK-NEXT: inside basic blocks -;; CHECK-NEXT: -;; CHECK-NEXT: --local-subtyping apply more specific subtypes to +;; CHECK-EMPTY: +;; CHECK-NEXT: --local-subtyping apply more specific subtypes to ;; CHECK-NEXT: locals where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --log-execution instrument the build with +;; CHECK-EMPTY: +;; CHECK-NEXT: --log-execution instrument the build with ;; CHECK-NEXT: logging of where execution goes -;; CHECK-NEXT: -;; CHECK-NEXT: --make-shared-objects Make structs and arrays shared +;; CHECK-EMPTY: +;; CHECK-NEXT: --make-shared-objects Make structs and arrays shared ;; CHECK-NEXT: and functions unshared -;; CHECK-NEXT: -;; CHECK-NEXT: --mark-js-called mark js called functions (using +;; CHECK-EMPTY: +;; CHECK-NEXT: --mark-js-called mark js called functions (using ;; CHECK-NEXT: configureAll) as doing so -;; CHECK-NEXT: -;; CHECK-NEXT: --memory-packing packs memory into separate +;; CHECK-EMPTY: +;; CHECK-NEXT: --memory-packing packs memory into separate ;; CHECK-NEXT: segments, skipping zeros -;; CHECK-NEXT: -;; CHECK-NEXT: --memory64-lowering lower loads and stores to a -;; CHECK-NEXT: 64-bit memory to instead use a +;; CHECK-EMPTY: +;; CHECK-NEXT: --memory64-lowering lower loads and stores to a +;; CHECK-NEXT: 64-bit memory to instead use a ;; CHECK-NEXT: 32-bit one -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --merge-blocks merges blocks to their parents -;; CHECK-NEXT: -;; CHECK-NEXT: --merge-j2cl-itables Merges itable structures into -;; CHECK-NEXT: vtables to make types more +;; CHECK-EMPTY: +;; CHECK-NEXT: --merge-j2cl-itables Merges itable structures into +;; CHECK-NEXT: vtables to make types more ;; CHECK-NEXT: compact -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --merge-locals merges locals when beneficial -;; CHECK-NEXT: -;; CHECK-NEXT: --merge-similar-functions merges similar functions when +;; CHECK-EMPTY: +;; CHECK-NEXT: --merge-similar-functions merges similar functions when ;; CHECK-NEXT: benefical -;; CHECK-NEXT: -;; CHECK-NEXT: --metrics reports metrics (with an -;; CHECK-NEXT: optional title, +;; CHECK-EMPTY: +;; CHECK-NEXT: --metrics reports metrics (with an +;; CHECK-NEXT: optional title, ;; CHECK-NEXT: --metrics[=TITLE]) -;; CHECK-NEXT: -;; CHECK-NEXT: --minify-imports minifies import names (only -;; CHECK-NEXT: those, and not export names), -;; CHECK-NEXT: and emits a mapping to the +;; CHECK-EMPTY: +;; CHECK-NEXT: --minify-imports minifies import names (only +;; CHECK-NEXT: those, and not export names), +;; CHECK-NEXT: and emits a mapping to the ;; CHECK-NEXT: minified ones -;; CHECK-NEXT: -;; CHECK-NEXT: --minify-imports-and-exports minifies both import and export -;; CHECK-NEXT: names, and emits a mapping to +;; CHECK-EMPTY: +;; CHECK-NEXT: --minify-imports-and-exports minifies both import and export +;; CHECK-NEXT: names, and emits a mapping to ;; CHECK-NEXT: the minified ones -;; CHECK-NEXT: -;; CHECK-NEXT: --minify-imports-and-exports-and-modules minifies both import and export -;; CHECK-NEXT: names, and emits a mapping to -;; CHECK-NEXT: the minified ones, and minifies +;; CHECK-EMPTY: +;; CHECK-NEXT: --minify-imports-and-exports-and-modules minifies both import and export +;; CHECK-NEXT: names, and emits a mapping to +;; CHECK-NEXT: the minified ones, and minifies ;; CHECK-NEXT: the modules as well -;; CHECK-NEXT: -;; CHECK-NEXT: --minimize-rec-groups Split types into minimal +;; CHECK-EMPTY: +;; CHECK-NEXT: --minimize-rec-groups Split types into minimal ;; CHECK-NEXT: recursion groups -;; CHECK-NEXT: -;; CHECK-NEXT: --monomorphize creates specialized versions of +;; CHECK-EMPTY: +;; CHECK-NEXT: --monomorphize creates specialized versions of ;; CHECK-NEXT: functions -;; CHECK-NEXT: -;; CHECK-NEXT: --monomorphize-always creates specialized versions of +;; CHECK-EMPTY: +;; CHECK-NEXT: --monomorphize-always creates specialized versions of ;; CHECK-NEXT: functions (even if unhelpful) -;; CHECK-NEXT: -;; CHECK-NEXT: --multi-memory-lowering combines multiple memories into +;; CHECK-EMPTY: +;; CHECK-NEXT: --multi-memory-lowering combines multiple memories into ;; CHECK-NEXT: a single memory -;; CHECK-NEXT: -;; CHECK-NEXT: --multi-memory-lowering-with-bounds-checks combines multiple memories into +;; CHECK-EMPTY: +;; CHECK-NEXT: --multi-memory-lowering-with-bounds-checks combines multiple memories into ;; CHECK-NEXT: a single memory, trapping if the ;; CHECK-NEXT: read or write is larger than the ;; CHECK-NEXT: length of the memory's data -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --name-types (re)name all heap types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --nm name list -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --no-full-inline mark functions as no-inline (for ;; CHECK-NEXT: full inlining only) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --no-inline mark functions as no-inline -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --no-partial-inline mark functions as no-inline (for ;; CHECK-NEXT: partial inlining only) -;; CHECK-NEXT: -;; CHECK-NEXT: --once-reduction reduces calls to code that only +;; CHECK-EMPTY: +;; CHECK-NEXT: --once-reduction reduces calls to code that only ;; CHECK-NEXT: runs once -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-added-constants optimizes added constants into +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-added-constants optimizes added constants into ;; CHECK-NEXT: load/store offsets -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-added-constants-propagate optimizes added constants into -;; CHECK-NEXT: load/store offsets, propagating +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-added-constants-propagate optimizes added constants into +;; CHECK-NEXT: load/store offsets, propagating ;; CHECK-NEXT: them across locals too -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-casts eliminate and reuse casts -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-for-js early optimize of the +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-for-js early optimize of the ;; CHECK-NEXT: instruction combinations for js -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-instructions optimizes instruction +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-instructions optimizes instruction ;; CHECK-NEXT: combinations -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-j2cl optimizes J2CL specific +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-j2cl optimizes J2CL specific ;; CHECK-NEXT: constructs. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --outlining outline instructions -;; CHECK-NEXT: -;; CHECK-NEXT: --pick-load-signs pick load signs based on their +;; CHECK-EMPTY: +;; CHECK-NEXT: --pick-load-signs pick load signs based on their ;; CHECK-NEXT: uses -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --poppify Transform Binaryen IR into Poppy ;; CHECK-NEXT: IR -;; CHECK-NEXT: -;; CHECK-NEXT: --post-emscripten miscellaneous optimizations for +;; CHECK-EMPTY: +;; CHECK-NEXT: --post-emscripten miscellaneous optimizations for ;; CHECK-NEXT: Emscripten-generated code -;; CHECK-NEXT: -;; CHECK-NEXT: --precompute computes compile-time +;; CHECK-EMPTY: +;; CHECK-NEXT: --precompute computes compile-time ;; CHECK-NEXT: evaluatable expressions -;; CHECK-NEXT: -;; CHECK-NEXT: --precompute-propagate computes compile-time -;; CHECK-NEXT: evaluatable expressions and +;; CHECK-EMPTY: +;; CHECK-NEXT: --precompute-propagate computes compile-time +;; CHECK-NEXT: evaluatable expressions and ;; CHECK-NEXT: propagates them through locals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print print in s-expression format -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-boundary print boundary in JSON format -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-call-graph print call graph -;; CHECK-NEXT: -;; CHECK-NEXT: --print-features print options for enabled +;; CHECK-EMPTY: +;; CHECK-NEXT: --print-features print options for enabled ;; CHECK-NEXT: features -;; CHECK-NEXT: -;; CHECK-NEXT: --print-full print in full s-expression +;; CHECK-EMPTY: +;; CHECK-NEXT: --print-full print in full s-expression ;; CHECK-NEXT: format -;; CHECK-NEXT: -;; CHECK-NEXT: --print-function-map print a map of function indexes +;; CHECK-EMPTY: +;; CHECK-NEXT: --print-function-map print a map of function indexes ;; CHECK-NEXT: to names -;; CHECK-NEXT: -;; CHECK-NEXT: --print-minified print in minified s-expression +;; CHECK-EMPTY: +;; CHECK-NEXT: --print-minified print in minified s-expression ;; CHECK-NEXT: format -;; CHECK-NEXT: -;; CHECK-NEXT: --propagate-debug-locs propagate debug location from -;; CHECK-NEXT: parents or previous siblings to +;; CHECK-EMPTY: +;; CHECK-NEXT: --propagate-debug-locs propagate debug location from +;; CHECK-NEXT: parents or previous siblings to ;; CHECK-NEXT: child nodes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --propagate-globals-globally propagate global values to other ;; CHECK-NEXT: globals (useful for tests) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --remove-exports removes exports using a wildcard -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-imports removes imports and replaces +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-imports removes imports and replaces ;; CHECK-NEXT: them with nops -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-memory removes memory init (legacy +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-memory removes memory init (legacy ;; CHECK-NEXT: name) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --remove-memory-init removes memory initialization -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-non-js-ops removes operations incompatible +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-non-js-ops removes operations incompatible ;; CHECK-NEXT: with js -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-relaxed-simd replaces relaxed SIMD +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-relaxed-simd replaces relaxed SIMD ;; CHECK-NEXT: instructions with unreachable -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-unused-brs removes breaks from locations +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-unused-brs removes breaks from locations ;; CHECK-NEXT: that are not needed -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --remove-unused-module-elements removes unused module elements -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-unused-names removes names from locations +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-unused-names removes names from locations ;; CHECK-NEXT: that are never branched to -;; CHECK-NEXT: -;; CHECK-NEXT: --remove-unused-nonfunction-module-elements removes unused module elements +;; CHECK-EMPTY: +;; CHECK-NEXT: --remove-unused-nonfunction-module-elements removes unused module elements ;; CHECK-NEXT: that are not functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --remove-unused-types remove unused private GC types -;; CHECK-NEXT: -;; CHECK-NEXT: --reorder-functions sorts functions by access +;; CHECK-EMPTY: +;; CHECK-NEXT: --reorder-functions sorts functions by access ;; CHECK-NEXT: frequency -;; CHECK-NEXT: -;; CHECK-NEXT: --reorder-functions-by-name sorts functions by name (useful +;; CHECK-EMPTY: +;; CHECK-NEXT: --reorder-functions-by-name sorts functions by name (useful ;; CHECK-NEXT: for debugging) -;; CHECK-NEXT: -;; CHECK-NEXT: --reorder-globals sorts globals by access +;; CHECK-EMPTY: +;; CHECK-NEXT: --reorder-globals sorts globals by access ;; CHECK-NEXT: frequency -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --reorder-locals sorts locals by access frequency -;; CHECK-NEXT: -;; CHECK-NEXT: --reorder-types sorts private types by access +;; CHECK-EMPTY: +;; CHECK-NEXT: --reorder-types sorts private types by access ;; CHECK-NEXT: frequency -;; CHECK-NEXT: -;; CHECK-NEXT: --rereloop re-optimize control flow using +;; CHECK-EMPTY: +;; CHECK-NEXT: --rereloop re-optimize control flow using ;; CHECK-NEXT: the relooper algorithm -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --roundtrip write the module to binary, then ;; CHECK-NEXT: read it -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --rse remove redundant local.sets -;; CHECK-NEXT: -;; CHECK-NEXT: --safe-heap instrument loads and stores to +;; CHECK-EMPTY: +;; CHECK-NEXT: --safe-heap instrument loads and stores to ;; CHECK-NEXT: check for invalid behavior -;; CHECK-NEXT: -;; CHECK-NEXT: --separate-data-segments write data segments to a file +;; CHECK-EMPTY: +;; CHECK-NEXT: --separate-data-segments write data segments to a file ;; CHECK-NEXT: and strip them from the module -;; CHECK-NEXT: -;; CHECK-NEXT: --set-globals sets specified globals to +;; CHECK-EMPTY: +;; CHECK-NEXT: --set-globals sets specified globals to ;; CHECK-NEXT: specified values -;; CHECK-NEXT: -;; CHECK-NEXT: --signature-pruning remove params from function +;; CHECK-EMPTY: +;; CHECK-NEXT: --signature-pruning remove params from function ;; CHECK-NEXT: signature types where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --signature-refining apply more specific subtypes to +;; CHECK-EMPTY: +;; CHECK-NEXT: --signature-refining apply more specific subtypes to ;; CHECK-NEXT: signature types where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --signext-lowering lower sign-ext operations to -;; CHECK-NEXT: wasm mvp and disable the sign +;; CHECK-EMPTY: +;; CHECK-NEXT: --signext-lowering lower sign-ext operations to +;; CHECK-NEXT: wasm mvp and disable the sign ;; CHECK-NEXT: extension feature -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-globals miscellaneous globals-related +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-globals miscellaneous globals-related ;; CHECK-NEXT: optimizations -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-globals-optimizing miscellaneous globals-related -;; CHECK-NEXT: optimizations, and optimizes -;; CHECK-NEXT: where we replaced global.gets +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-globals-optimizing miscellaneous globals-related +;; CHECK-NEXT: optimizations, and optimizes +;; CHECK-NEXT: where we replaced global.gets ;; CHECK-NEXT: with constants -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals miscellaneous locals-related +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals miscellaneous locals-related ;; CHECK-NEXT: optimizations -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals-nonesting miscellaneous locals-related -;; CHECK-NEXT: optimizations (no nesting at +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals-nonesting miscellaneous locals-related +;; CHECK-NEXT: optimizations (no nesting at ;; CHECK-NEXT: all; preserves flatness) -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals-nostructure miscellaneous locals-related +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals-nostructure miscellaneous locals-related ;; CHECK-NEXT: optimizations (no structure) -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals-notee miscellaneous locals-related +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals-notee miscellaneous locals-related ;; CHECK-NEXT: optimizations (no tees) -;; CHECK-NEXT: -;; CHECK-NEXT: --simplify-locals-notee-nostructure miscellaneous locals-related -;; CHECK-NEXT: optimizations (no tees or +;; CHECK-EMPTY: +;; CHECK-NEXT: --simplify-locals-notee-nostructure miscellaneous locals-related +;; CHECK-NEXT: optimizations (no tees or ;; CHECK-NEXT: structure) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --souperify emit Souper IR in text form -;; CHECK-NEXT: -;; CHECK-NEXT: --souperify-single-use emit Souper IR in text form +;; CHECK-EMPTY: +;; CHECK-NEXT: --souperify-single-use emit Souper IR in text form ;; CHECK-NEXT: (single-use nodes only) -;; CHECK-NEXT: -;; CHECK-NEXT: --spill-pointers spill pointers to the C stack +;; CHECK-EMPTY: +;; CHECK-NEXT: --spill-pointers spill pointers to the C stack ;; CHECK-NEXT: (useful for Boehm-style GC) -;; CHECK-NEXT: -;; CHECK-NEXT: --ssa ssa-ify variables so that they +;; CHECK-EMPTY: +;; CHECK-NEXT: --ssa ssa-ify variables so that they ;; CHECK-NEXT: have a single assignment -;; CHECK-NEXT: -;; CHECK-NEXT: --ssa-nomerge ssa-ify variables so that they -;; CHECK-NEXT: have a single assignment, +;; CHECK-EMPTY: +;; CHECK-NEXT: --ssa-nomerge ssa-ify variables so that they +;; CHECK-NEXT: have a single assignment, ;; CHECK-NEXT: ignoring merges -;; CHECK-NEXT: -;; CHECK-NEXT: --stack-check enforce limits on llvm's +;; CHECK-EMPTY: +;; CHECK-NEXT: --stack-check enforce limits on llvm's ;; CHECK-NEXT: __stack_pointer global -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --string-gathering gathers wasm strings to globals -;; CHECK-NEXT: -;; CHECK-NEXT: --string-lifting lift string imports to wasm +;; CHECK-EMPTY: +;; CHECK-NEXT: --string-lifting lift string imports to wasm ;; CHECK-NEXT: strings -;; CHECK-NEXT: -;; CHECK-NEXT: --string-lowering lowers wasm strings and +;; CHECK-EMPTY: +;; CHECK-NEXT: --string-lowering lowers wasm strings and ;; CHECK-NEXT: operations to imports -;; CHECK-NEXT: -;; CHECK-NEXT: --string-lowering-magic-imports same as string-lowering, but -;; CHECK-NEXT: encodes well-formed strings as +;; CHECK-EMPTY: +;; CHECK-NEXT: --string-lowering-magic-imports same as string-lowering, but +;; CHECK-NEXT: encodes well-formed strings as ;; CHECK-NEXT: magic imports -;; CHECK-NEXT: -;; CHECK-NEXT: --string-lowering-magic-imports-assert same as -;; CHECK-NEXT: string-lowering-magic-imports, +;; CHECK-EMPTY: +;; CHECK-NEXT: --string-lowering-magic-imports-assert same as +;; CHECK-NEXT: string-lowering-magic-imports, ;; CHECK-NEXT: but raise a fatal error if there ;; CHECK-NEXT: are invalid strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --strip deprecated; same as strip-debug -;; CHECK-NEXT: -;; CHECK-NEXT: --strip-debug strip debug info (including the +;; CHECK-EMPTY: +;; CHECK-NEXT: --strip-debug strip debug info (including the ;; CHECK-NEXT: names section) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --strip-dwarf strip dwarf debug info -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --strip-eh strip EH instructions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --strip-producers strip the wasm producers section -;; CHECK-NEXT: -;; CHECK-NEXT: --strip-target-features strip the wasm target features +;; CHECK-EMPTY: +;; CHECK-NEXT: --strip-target-features strip the wasm target features ;; CHECK-NEXT: section -;; CHECK-NEXT: -;; CHECK-NEXT: --strip-toolchain-annotations strip all toolchain-specific +;; CHECK-EMPTY: +;; CHECK-NEXT: --strip-toolchain-annotations strip all toolchain-specific ;; CHECK-NEXT: code annotations -;; CHECK-NEXT: -;; CHECK-NEXT: --stub-unsupported-js stub out unsupported JS +;; CHECK-EMPTY: +;; CHECK-NEXT: --stub-unsupported-js stub out unsupported JS ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --symbolmap (alias for print-function-map) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --table64-lowering alias for memory64-lowering -;; CHECK-NEXT: -;; CHECK-NEXT: --trace-calls instrument the build with code -;; CHECK-NEXT: to intercept specific function +;; CHECK-EMPTY: +;; CHECK-NEXT: --trace-calls instrument the build with code +;; CHECK-NEXT: to intercept specific function ;; CHECK-NEXT: calls -;; CHECK-NEXT: -;; CHECK-NEXT: --translate-to-exnref translate old Phase 3 EH -;; CHECK-NEXT: instructions to new ones with +;; CHECK-EMPTY: +;; CHECK-NEXT: --translate-to-exnref translate old Phase 3 EH +;; CHECK-NEXT: instructions to new ones with ;; CHECK-NEXT: exnref -;; CHECK-NEXT: -;; CHECK-NEXT: --translate-to-new-eh deprecated; same as +;; CHECK-EMPTY: +;; CHECK-NEXT: --translate-to-new-eh deprecated; same as ;; CHECK-NEXT: translate-to-exnref -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --trap-mode-clamp replace trapping operations with ;; CHECK-NEXT: clamping semantics -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --trap-mode-js replace trapping operations with ;; CHECK-NEXT: js semantics -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --tuple-optimization optimize trivial tuples away -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --type-finalizing mark all leaf types as final -;; CHECK-NEXT: -;; CHECK-NEXT: --type-merging merge types to their supertypes +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-merging merge types to their supertypes ;; CHECK-NEXT: where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --type-refining apply more specific subtypes to -;; CHECK-NEXT: type fields where possible -;; CHECK-NEXT: -;; CHECK-NEXT: --type-refining-gufa apply more specific subtypes to +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-refining apply more specific subtypes to ;; CHECK-NEXT: type fields where possible +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-refining-gufa apply more specific subtypes to +;; CHECK-NEXT: type fields where possible ;; CHECK-NEXT: (using GUFA) -;; CHECK-NEXT: -;; CHECK-NEXT: --type-ssa create new types to help other +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-ssa create new types to help other ;; CHECK-NEXT: optimizations -;; CHECK-NEXT: -;; CHECK-NEXT: --type-unfinalizing mark all types as non-final +;; CHECK-EMPTY: +;; CHECK-NEXT: --type-unfinalizing mark all types as non-final ;; CHECK-NEXT: (open) -;; CHECK-NEXT: -;; CHECK-NEXT: --unsubtyping removes unnecessary subtyping +;; CHECK-EMPTY: +;; CHECK-NEXT: --unsubtyping removes unnecessary subtyping ;; CHECK-NEXT: relationships -;; CHECK-NEXT: -;; CHECK-NEXT: --untee removes local.tees, replacing +;; CHECK-EMPTY: +;; CHECK-NEXT: --untee removes local.tees, replacing ;; CHECK-NEXT: them with sets and gets -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --vacuum removes obviously unneeded code -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Optimization options: ;; CHECK-NEXT: --------------------- -;; CHECK-NEXT: -;; CHECK-NEXT: -O execute default optimization +;; CHECK-EMPTY: +;; CHECK-NEXT: -O execute default optimization ;; CHECK-NEXT: passes (equivalent to -Os) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: -O0 execute no optimization passes -;; CHECK-NEXT: -;; CHECK-NEXT: -O1 execute -O1 optimization passes -;; CHECK-NEXT: (quick&useful opts, useful for +;; CHECK-EMPTY: +;; CHECK-NEXT: -O1 execute -O1 optimization passes +;; CHECK-NEXT: (quick&useful opts, useful for ;; CHECK-NEXT: iteration builds) -;; CHECK-NEXT: -;; CHECK-NEXT: -O2 execute -O2 optimization passes -;; CHECK-NEXT: (most opts, generally gets most +;; CHECK-EMPTY: +;; CHECK-NEXT: -O2 execute -O2 optimization passes +;; CHECK-NEXT: (most opts, generally gets most ;; CHECK-NEXT: perf) -;; CHECK-NEXT: -;; CHECK-NEXT: -O3 execute -O3 optimization passes -;; CHECK-NEXT: (spends potentially a lot of +;; CHECK-EMPTY: +;; CHECK-NEXT: -O3 execute -O3 optimization passes +;; CHECK-NEXT: (spends potentially a lot of ;; CHECK-NEXT: time optimizing) -;; CHECK-NEXT: -;; CHECK-NEXT: -O4 execute -O4 optimization passes -;; CHECK-NEXT: (also flatten the IR, which can +;; CHECK-EMPTY: +;; CHECK-NEXT: -O4 execute -O4 optimization passes +;; CHECK-NEXT: (also flatten the IR, which can ;; CHECK-NEXT: take a lot more time and memory, -;; CHECK-NEXT: but is useful on more nested / +;; CHECK-NEXT: but is useful on more nested / ;; CHECK-NEXT: complex / less-optimized input) -;; CHECK-NEXT: -;; CHECK-NEXT: -Os execute default optimization +;; CHECK-EMPTY: +;; CHECK-NEXT: -Os execute default optimization ;; CHECK-NEXT: passes, focusing on code size -;; CHECK-NEXT: -;; CHECK-NEXT: -Oz execute default optimization -;; CHECK-NEXT: passes, super-focusing on code +;; CHECK-EMPTY: +;; CHECK-NEXT: -Oz execute default optimization +;; CHECK-NEXT: passes, super-focusing on code ;; CHECK-NEXT: size -;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-level,-ol How much to focus on optimizing +;; CHECK-EMPTY: +;; CHECK-NEXT: --optimize-level,-ol How much to focus on optimizing ;; CHECK-NEXT: code -;; CHECK-NEXT: -;; CHECK-NEXT: --shrink-level,-s How much to focus on shrinking +;; CHECK-EMPTY: +;; CHECK-NEXT: --shrink-level,-s How much to focus on shrinking ;; CHECK-NEXT: code size -;; CHECK-NEXT: -;; CHECK-NEXT: --debuginfo,-g Emit names section in wasm -;; CHECK-NEXT: binary (or full debuginfo in +;; CHECK-EMPTY: +;; CHECK-NEXT: --debuginfo,-g Emit names section in wasm +;; CHECK-NEXT: binary (or full debuginfo in ;; CHECK-NEXT: wast) -;; CHECK-NEXT: -;; CHECK-NEXT: --always-inline-max-function-size,-aimfs Max size of functions that are +;; CHECK-EMPTY: +;; CHECK-NEXT: --always-inline-max-function-size,-aimfs Max size of functions that are ;; CHECK-NEXT: always inlined (default 2, which ;; CHECK-NEXT: is safe for use with -Os builds) -;; CHECK-NEXT: -;; CHECK-NEXT: --flexible-inline-max-function-size,-fimfs Max size of functions that are -;; CHECK-NEXT: inlined when lightweight (no -;; CHECK-NEXT: loops or function calls) when -;; CHECK-NEXT: optimizing aggressively for +;; CHECK-EMPTY: +;; CHECK-NEXT: --flexible-inline-max-function-size,-fimfs Max size of functions that are +;; CHECK-NEXT: inlined when lightweight (no +;; CHECK-NEXT: loops or function calls) when +;; CHECK-NEXT: optimizing aggressively for ;; CHECK-NEXT: speed (-O3). Default: 20 -;; CHECK-NEXT: -;; CHECK-NEXT: --one-caller-inline-max-function-size,-ocimfs Max size of functions that are -;; CHECK-NEXT: inlined when there is only one -;; CHECK-NEXT: caller (default -1, which means +;; CHECK-EMPTY: +;; CHECK-NEXT: --one-caller-inline-max-function-size,-ocimfs Max size of functions that are +;; CHECK-NEXT: inlined when there is only one +;; CHECK-NEXT: caller (default -1, which means ;; CHECK-NEXT: all such functions are inlined) -;; CHECK-NEXT: -;; CHECK-NEXT: --inline-max-combined-binary-size,-imcbs Max size of combined functions +;; CHECK-EMPTY: +;; CHECK-NEXT: --inline-max-combined-binary-size,-imcbs Max size of combined functions ;; CHECK-NEXT: after inlining. Default: 409600 -;; CHECK-NEXT: -;; CHECK-NEXT: --inline-functions-with-loops,-ifwl Allow inlining functions with +;; CHECK-EMPTY: +;; CHECK-NEXT: --inline-functions-with-loops,-ifwl Allow inlining functions with ;; CHECK-NEXT: loops -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --partial-inlining-ifs,-pii Number of ifs allowed in partial -;; CHECK-NEXT: inlining (zero means partial -;; CHECK-NEXT: inlining is disabled) (default: +;; CHECK-NEXT: inlining (zero means partial +;; CHECK-NEXT: inlining is disabled) (default: ;; CHECK-NEXT: 0) -;; CHECK-NEXT: -;; CHECK-NEXT: --ignore-implicit-traps,-iit Optimize under the helpful -;; CHECK-NEXT: assumption that no surprising +;; CHECK-EMPTY: +;; CHECK-NEXT: --ignore-implicit-traps,-iit Optimize under the helpful +;; CHECK-NEXT: assumption that no surprising ;; CHECK-NEXT: traps occur (from load, div/mod, ;; CHECK-NEXT: etc.) -;; CHECK-NEXT: -;; CHECK-NEXT: --traps-never-happen,-tnh Optimize under the helpful -;; CHECK-NEXT: assumption that no trap is -;; CHECK-NEXT: reached at runtime (from load, +;; CHECK-EMPTY: +;; CHECK-NEXT: --traps-never-happen,-tnh Optimize under the helpful +;; CHECK-NEXT: assumption that no trap is +;; CHECK-NEXT: reached at runtime (from load, ;; CHECK-NEXT: div/mod, etc.) -;; CHECK-NEXT: -;; CHECK-NEXT: --low-memory-unused,-lmu Optimize under the helpful -;; CHECK-NEXT: assumption that the low 1K of -;; CHECK-NEXT: memory is not used by the +;; CHECK-EMPTY: +;; CHECK-NEXT: --low-memory-unused,-lmu Optimize under the helpful +;; CHECK-NEXT: assumption that the low 1K of +;; CHECK-NEXT: memory is not used by the ;; CHECK-NEXT: application -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --fast-math,-ffm Optimize floats without handling -;; CHECK-NEXT: corner cases of NaNs and +;; CHECK-NEXT: corner cases of NaNs and ;; CHECK-NEXT: rounding -;; CHECK-NEXT: -;; CHECK-NEXT: --zero-filled-memory,-uim Assume that an imported memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --zero-filled-memory,-uim Assume that an imported memory ;; CHECK-NEXT: will be zero-initialized -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --skip-pass,-sp Skip a pass (do not run it) -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: Tool options: ;; CHECK-NEXT: ------------- -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --mvp-features,-mvp Disable all non-MVP features -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --all-features,-all Enable all features -;; CHECK-NEXT: -;; CHECK-NEXT: --detect-features (deprecated - this flag does +;; CHECK-EMPTY: +;; CHECK-NEXT: --detect-features (deprecated - this flag does ;; CHECK-NEXT: nothing) -;; CHECK-NEXT: -;; CHECK-NEXT: --quiet,-q Emit less verbose output and +;; CHECK-EMPTY: +;; CHECK-NEXT: --quiet,-q Emit less verbose output and ;; CHECK-NEXT: hide trivial warnings. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --experimental-poppy Parse wast files as Poppy IR for ;; CHECK-NEXT: testing purposes. -;; CHECK-NEXT: -;; CHECK-NEXT: --emit-module-names Emit module names, even if not -;; CHECK-NEXT: emitting the rest of the names +;; CHECK-EMPTY: +;; CHECK-NEXT: --emit-module-names Emit module names, even if not +;; CHECK-NEXT: emitting the rest of the names ;; CHECK-NEXT: section. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-sign-ext Enable sign extension operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-sign-ext Disable sign extension +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-sign-ext Disable sign extension ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-threads Enable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-threads Disable atomic operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-mutable-globals Enable mutable globals -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-mutable-globals Disable mutable globals -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-nontrapping-float-to-int Enable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-nontrapping-float-to-int Disable nontrapping float-to-int ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-simd Enable SIMD operations and types -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-simd Disable SIMD operations and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-simd Disable SIMD operations and ;; CHECK-NEXT: types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-bulk-memory Enable bulk memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-bulk-memory Disable bulk memory operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-bulk-memory-opt Enable memory.copy and ;; CHECK-NEXT: memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-bulk-memory-opt Disable memory.copy and ;; CHECK-NEXT: memory.fill -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of -;; CHECK-NEXT: call-indirect (Ignored for -;; CHECK-NEXT: compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-call-indirect-overlong Enable LEB encoding of +;; CHECK-NEXT: call-indirect (Ignored for +;; CHECK-NEXT: compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of -;; CHECK-NEXT: call-indirect (Ignored for -;; CHECK-NEXT: compatibility as it has no +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-call-indirect-overlong Disable LEB encoding of +;; CHECK-NEXT: call-indirect (Ignored for +;; CHECK-NEXT: compatibility as it has no ;; CHECK-NEXT: effect on Binaryen) -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-exception-handling Enable exception handling +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-exception-handling Enable exception handling ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-exception-handling Disable exception handling +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-exception-handling Disable exception handling ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-tail-call Enable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-tail-call Disable tail call operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-reference-types Enable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-reference-types Disable reference types -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multivalue Enable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multivalue Disable multivalue functions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-gc Enable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-gc Disable garbage collection -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-memory64 Enable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-memory64 Disable memory64 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-relaxed-simd Enable relaxed SIMD -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-extended-const Enable extended const +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-extended-const Enable extended const ;; CHECK-NEXT: expressions -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-extended-const Disable extended const +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-extended-const Disable extended const ;; CHECK-NEXT: expressions -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-strings Enable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-strings Disable strings -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multimemory Enable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-multimemory Disable multimemory -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-stack-switching Enable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-stack-switching Disable stack switching -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-shared-everything Enable shared-everything threads -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-shared-everything Disable shared-everything +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-shared-everything Disable shared-everything ;; CHECK-NEXT: threads -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-fp16 Enable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-fp16 Disable float 16 operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-descriptors Enable custom descriptors (RTTs) ;; CHECK-NEXT: and exact references -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-custom-descriptors Disable custom descriptors ;; CHECK-NEXT: (RTTs) and exact references -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-multibyte Enable multibyte array loads and ;; CHECK-NEXT: stores -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-multibyte Disable multibyte array loads ;; CHECK-NEXT: and stores -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-acquire-release-atomics Enable acquire/release atomic ;; CHECK-NEXT: memory operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-acquire-release-atomics Disable acquire/release atomic ;; CHECK-NEXT: memory operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-custom-page-sizes Enable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-custom-page-sizes Disable custom page sizes -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-wide-arithmetic Enable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-wide-arithmetic Disable wide arithmetic -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-compact-imports Enable compact import section -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-compact-imports Disable compact import section -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --enable-relaxed-atomics Enable relaxed atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory +;; CHECK-EMPTY: +;; CHECK-NEXT: --disable-relaxed-atomics Disable relaxed atomic memory ;; CHECK-NEXT: operations -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag -;; CHECK-NEXT: -;; CHECK-NEXT: --no-validation,-n Disables validation, assumes +;; CHECK-EMPTY: +;; CHECK-NEXT: --no-validation,-n Disables validation, assumes ;; CHECK-NEXT: inputs are correct -;; CHECK-NEXT: -;; CHECK-NEXT: --pass-arg,-pa An argument passed along to -;; CHECK-NEXT: optimization passes being run. -;; CHECK-NEXT: Must be in the form KEY@VALUE. -;; CHECK-NEXT: If KEY is the name of a pass -;; CHECK-NEXT: then it applies to the closest +;; CHECK-EMPTY: +;; CHECK-NEXT: --pass-arg,-pa An argument passed along to +;; CHECK-NEXT: optimization passes being run. +;; CHECK-NEXT: Must be in the form KEY@VALUE. +;; CHECK-NEXT: If KEY is the name of a pass +;; CHECK-NEXT: then it applies to the closest ;; CHECK-NEXT: instance of that pass before us. ;; CHECK-NEXT: If KEY is not the name of a pass -;; CHECK-NEXT: then it is a global option that -;; CHECK-NEXT: applies to all pass instances +;; CHECK-NEXT: then it is a global option that +;; CHECK-NEXT: applies to all pass instances ;; CHECK-NEXT: that read it. -;; CHECK-NEXT: -;; CHECK-NEXT: --closed-world,-cw Assume code outside of the -;; CHECK-NEXT: module does not inspect or -;; CHECK-NEXT: interact with GC and function -;; CHECK-NEXT: references, even if they are +;; CHECK-EMPTY: +;; CHECK-NEXT: --closed-world,-cw Assume code outside of the +;; CHECK-NEXT: module does not inspect or +;; CHECK-NEXT: interact with GC and function +;; CHECK-NEXT: references, even if they are ;; CHECK-NEXT: passed out. The outside may hold -;; CHECK-NEXT: on to them and pass them back -;; CHECK-NEXT: in, but not inspect their +;; CHECK-NEXT: on to them and pass them back +;; CHECK-NEXT: in, but not inspect their ;; CHECK-NEXT: contents or call them. -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --preserve-type-order Preserve the order of types from -;; CHECK-NEXT: the input (useful for debugging +;; CHECK-NEXT: the input (useful for debugging ;; CHECK-NEXT: and testing) -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --generate-stack-ir generate StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --optimize-stack-ir optimize StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --print-stack-ir print StackIR during writing -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --no-stack-ir do not use StackIR (even when it ;; CHECK-NEXT: is the default) -;; CHECK-NEXT: -;; CHECK-NEXT: +;; CHECK-EMPTY: +;; CHECK-EMPTY: ;; CHECK-NEXT: General options: ;; CHECK-NEXT: ---------------- -;; CHECK-NEXT: -;; CHECK-NEXT: --version Output version information and +;; CHECK-EMPTY: +;; CHECK-NEXT: --version Output version information and ;; CHECK-NEXT: exit -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: -;; CHECK-NEXT: --debug,-d Print debug information to +;; CHECK-EMPTY: +;; CHECK-NEXT: --debug,-d Print debug information to ;; CHECK-NEXT: stderr -;; CHECK-NEXT: +;; CHECK-EMPTY: diff --git a/test/lit/merge/manifest-explicit-name.wat b/test/lit/merge/manifest-explicit-name.wat index b4f60fa5745..59e2b08874a 100644 --- a/test/lit/merge/manifest-explicit-name.wat +++ b/test/lit/merge/manifest-explicit-name.wat @@ -8,7 +8,7 @@ ;; CHECK: second ;; CHECK-NEXT: 0_1 -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; MERGED: (module ;; MERGED-NEXT: (type $0 (func)) diff --git a/test/lit/merge/manifest.wat b/test/lit/merge/manifest.wat index c93b40cdef9..db51cd70306 100644 --- a/test/lit/merge/manifest.wat +++ b/test/lit/merge/manifest.wat @@ -9,7 +9,7 @@ ;; CHECK: second ;; CHECK-NEXT: baz -;; CHECK-NEXT: +;; CHECK-EMPTY: ;; CHECK-NEXT: third ;; CHECK-NEXT: qux From 23c19e240a816a2d1c9786e1d1b2cf0d26311b57 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 28 Aug 2026 12:57:41 -0700 Subject: [PATCH 03/52] Update pinned filecheck version to 1.0.3 (#9054) Update requirements-dev.txt to use the modern Python filecheck package (1.0.3+). --- .github/workflows/ci.yml | 5 +++++ requirements-dev.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3513897b1b..06357533949 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,11 @@ jobs: # currently macos-13, but unfortunately that doesn't exist in github # actions so we settle for macos-14. os: [ubuntu-22.04, ubuntu-latest, macos-14, windows-latest, windows-11-arm] + env: + # Enable UTF-8 mode for Python on Windows. This is required for filecheck + # 1.0.3 to handle Unicode filenames/checks and should be unnecessary in + # future versions of filecheck. + PYTHONUTF8: 1 steps: - uses: actions/setup-python@v5 with: diff --git a/requirements-dev.txt b/requirements-dev.txt index 500c11b34e0..801fc6669e6 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,5 +4,5 @@ # Install with `pip3 install -r requirements-dev.txt` ruff==0.16.0 -filecheck==0.0.22 +filecheck==1.0.3 lit==0.11.0.post1 From 8bad4db00f130a0d4f6d1abc7cb3d0731a501df4 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 28 Aug 2026 15:54:38 -0700 Subject: [PATCH 04/52] Fast-math mode can ignore the difference between negative zero and zero (#9056) This is a standard part of `fast-math` in clang and gcc: https://clang.llvm.org/docs/UsersManual.html#cmdoption-ffast-math We may have already been optimizing it, I'm not sure, but a later PR will do so, so it seems worth documenting explicitly. --- CHANGELOG.md | 2 ++ src/tools/optimization-options.h | 3 ++- test/lit/help/wasm-metadce.test | 4 ++-- test/lit/help/wasm-opt.test | 4 ++-- test/lit/help/wasm2js.test | 4 ++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e26794db203..5637bb014d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ Current Trunk - Replace the `BINARYEN_ROOT` environment variable (used by developers who are doing out-of-tree builds of binaryen) with `BINARYEN_BIN` (#9023) - Reject non-natural alignment for atomic memory operations at parse time (#8962) +- Note that fast-math mode can ignore the difference between negative zero and + zero (like clang and gcc). (#9056) v132 ---- diff --git a/src/tools/optimization-options.h b/src/tools/optimization-options.h index 1e089f0b8c8..a43c92c3fe7 100644 --- a/src/tools/optimization-options.h +++ b/src/tools/optimization-options.h @@ -306,7 +306,8 @@ struct OptimizationOptions : public ToolOptions { .add( "--fast-math", "-ffm", - "Optimize floats without handling corner cases of NaNs and rounding", + "Optimize floats without handling corner cases of NaNs, rounding, and " + "negative zero", OptimizationOptionsCategory, Options::Arguments::Zero, [this](Options*, const std::string&) { passOptions.fastMath = true; }) diff --git a/test/lit/help/wasm-metadce.test b/test/lit/help/wasm-metadce.test index 5b11778ce3c..aef42e966d8 100644 --- a/test/lit/help/wasm-metadce.test +++ b/test/lit/help/wasm-metadce.test @@ -679,8 +679,8 @@ ;; CHECK-NEXT: application ;; CHECK-EMPTY: ;; CHECK-NEXT: --fast-math,-ffm Optimize floats without handling -;; CHECK-NEXT: corner cases of NaNs and -;; CHECK-NEXT: rounding +;; CHECK-NEXT: corner cases of NaNs, rounding, +;; CHECK-NEXT: and negative zero ;; CHECK-EMPTY: ;; CHECK-NEXT: --zero-filled-memory,-uim Assume that an imported memory ;; CHECK-NEXT: will be zero-initialized diff --git a/test/lit/help/wasm-opt.test b/test/lit/help/wasm-opt.test index 12add8d5783..95892a9cc86 100644 --- a/test/lit/help/wasm-opt.test +++ b/test/lit/help/wasm-opt.test @@ -715,8 +715,8 @@ ;; CHECK-NEXT: application ;; CHECK-EMPTY: ;; CHECK-NEXT: --fast-math,-ffm Optimize floats without handling -;; CHECK-NEXT: corner cases of NaNs and -;; CHECK-NEXT: rounding +;; CHECK-NEXT: corner cases of NaNs, rounding, +;; CHECK-NEXT: and negative zero ;; CHECK-EMPTY: ;; CHECK-NEXT: --zero-filled-memory,-uim Assume that an imported memory ;; CHECK-NEXT: will be zero-initialized diff --git a/test/lit/help/wasm2js.test b/test/lit/help/wasm2js.test index da53bd71492..97f04ac9a7e 100644 --- a/test/lit/help/wasm2js.test +++ b/test/lit/help/wasm2js.test @@ -643,8 +643,8 @@ ;; CHECK-NEXT: application ;; CHECK-EMPTY: ;; CHECK-NEXT: --fast-math,-ffm Optimize floats without handling -;; CHECK-NEXT: corner cases of NaNs and -;; CHECK-NEXT: rounding +;; CHECK-NEXT: corner cases of NaNs, rounding, +;; CHECK-NEXT: and negative zero ;; CHECK-EMPTY: ;; CHECK-NEXT: --zero-filled-memory,-uim Assume that an imported memory ;; CHECK-NEXT: will be zero-initialized From 39be64eccdf9069c8e26d28abc5c0c9932651924 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Mon, 31 Aug 2026 13:51:29 -0700 Subject: [PATCH 05/52] Update to filecheck 1.0.5 (#9059) Remove the PYTHONUTF8 variable from the Windows CI because the new filecheck version handles UTF-8 correcty by default. --- .github/workflows/ci.yml | 5 ----- requirements-dev.txt | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06357533949..c3513897b1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,11 +56,6 @@ jobs: # currently macos-13, but unfortunately that doesn't exist in github # actions so we settle for macos-14. os: [ubuntu-22.04, ubuntu-latest, macos-14, windows-latest, windows-11-arm] - env: - # Enable UTF-8 mode for Python on Windows. This is required for filecheck - # 1.0.3 to handle Unicode filenames/checks and should be unnecessary in - # future versions of filecheck. - PYTHONUTF8: 1 steps: - uses: actions/setup-python@v5 with: diff --git a/requirements-dev.txt b/requirements-dev.txt index 801fc6669e6..d33bb82c75d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,5 +4,5 @@ # Install with `pip3 install -r requirements-dev.txt` ruff==0.16.0 -filecheck==1.0.3 +filecheck==1.0.5 lit==0.11.0.post1 From 3a46a6c6f3aa49b3616aa6cb12f7aef5c678d170 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 31 Aug 2026 16:18:11 -0700 Subject: [PATCH 06/52] [wasm-split] Don't use update_lit_checks.py for some tests (#9061) `update_lit_checks.py` doesn't always work well with wasm-split. For example, for some tests, the test CHECK lines are mixed like this after running it: ```wast ;; PRIMARY: ... ;; SECONDARY: .... ;; PRIMARY: ... ;; SECONDARY: ... ``` A follow-up PR will change these two test files' CHECK lines to be mixed when using `update_lit_checks.py`, and making them not use in that PR will make it hard to see what actually change in that PR. To make the next PR's diff tidy, this makes a few tests not use the auto-updating script. This also adds `-all` to `transtiive-globals-multi.wast` to be consistent with other `transitive-globals*.wast` tests. --- test/lit/wasm-split/passive-deps.wast | 39 +++++------ .../wasm-split/transitive-globals-multi.wast | 64 ++++++++++--------- test/lit/wasm-split/transitive-globals.wast | 56 ++++++++-------- 3 files changed, 82 insertions(+), 77 deletions(-) diff --git a/test/lit/wasm-split/passive-deps.wast b/test/lit/wasm-split/passive-deps.wast index 9007cb6081a..9c14bb09e98 100644 --- a/test/lit/wasm-split/passive-deps.wast +++ b/test/lit/wasm-split/passive-deps.wast @@ -1,38 +1,39 @@ -;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. ;; RUN: wasm-split %s -all -g -o1 %t.1.wasm -o2 %t.2.wasm --split-funcs=split ;; RUN: wasm-dis -all %t.1.wasm | filecheck %s --check-prefix PRIMARY ;; RUN: wasm-dis -all %t.2.wasm | filecheck %s --check-prefix SECONDARY (module - ;; PRIMARY: (type $0 (func)) - - ;; PRIMARY: (global $g funcref (ref.null nofunc)) (global $g funcref (ref.null nofunc)) ;; We should scan this passive element segment's data and correctly mark $g as ;; used in the primary module. - ;; PRIMARY: (elem $passive-elem funcref (item (global.get $g))) (elem $passive-elem funcref (item (global.get $g))) - ;; PRIMARY: (export "global" (global $g)) - - ;; PRIMARY: (func $keep (type $0) - ;; PRIMARY-NEXT: (elem.drop $passive-elem) - ;; PRIMARY-NEXT: ) (func $keep (elem.drop $passive-elem) ) - ;; SECONDARY: (type $0 (func)) - - ;; SECONDARY: (import "primary" "global" (global $g funcref)) - - ;; SECONDARY: (func $split (type $0) - ;; SECONDARY-NEXT: (drop - ;; SECONDARY-NEXT: (global.get $g) - ;; SECONDARY-NEXT: ) - ;; SECONDARY-NEXT: ) (func $split (drop (global.get $g)) ) ) + +;; PRIMARY: (module +;; PRIMARY-NEXT: (type $0 (func)) +;; PRIMARY-NEXT: (global $g funcref (ref.null nofunc)) +;; PRIMARY-NEXT: (elem $passive-elem funcref (item (global.get $g))) +;; PRIMARY-NEXT: (export "global" (global $g)) +;; PRIMARY-NEXT: (func $keep (type $0) +;; PRIMARY-NEXT: (elem.drop $passive-elem) +;; PRIMARY-NEXT: ) +;; PRIMARY-NEXT: ) + +;; SECONDARY: (module +;; SECONDARY-NEXT: (type $0 (func)) +;; SECONDARY-NEXT: (import "primary" "global" (global $g funcref)) +;; SECONDARY-NEXT: (func $split (type $0) +;; SECONDARY-NEXT: (drop +;; SECONDARY-NEXT: (global.get $g) +;; SECONDARY-NEXT: ) +;; SECONDARY-NEXT: ) +;; SECONDARY-NEXT: ) diff --git a/test/lit/wasm-split/transitive-globals-multi.wast b/test/lit/wasm-split/transitive-globals-multi.wast index f9eda9a7d59..d1d6b73e61e 100644 --- a/test/lit/wasm-split/transitive-globals-multi.wast +++ b/test/lit/wasm-split/transitive-globals-multi.wast @@ -1,52 +1,54 @@ -;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. ;; RUN: wasm-split -all -g --multi-split %s --manifest %s.manifest --out-prefix=%t -o %t.wasm -;; RUN: wasm-dis %t.wasm | filecheck %s --check-prefix PRIMARY -;; RUN: wasm-dis %t1.wasm | filecheck %s --check-prefix SECONDARY1 -;; RUN: wasm-dis %t2.wasm | filecheck %s --check-prefix SECONDARY2 +;; RUN: wasm-dis -all %t.wasm | filecheck %s --check-prefix PRIMARY +;; RUN: wasm-dis -all %t1.wasm | filecheck %s --check-prefix SECONDARY1 +;; RUN: wasm-dis -all %t2.wasm | filecheck %s --check-prefix SECONDARY2 ;; Because global $e is used in both module1 ($split1) and module2 ($split2), $e ;; will be exported / imported, but we don't need to export $f. (module - ;; PRIMARY: (type $0 (func)) - - ;; PRIMARY: (global $f i32 (i32.const 42)) (global $f i32 (i32.const 42)) - ;; PRIMARY: (global $e i32 (global.get $f)) (global $e i32 (global.get $f)) - ;; PRIMARY: (export "global" (global $e)) - - ;; PRIMARY: (func $keep - ;; PRIMARY-NEXT: (nop) - ;; PRIMARY-NEXT: ) (func $keep (nop) ) - ;; SECONDARY1: (type $0 (func)) - - ;; SECONDARY1: (import "primary" "global" (global $e i32)) - - ;; SECONDARY1: (func $split1 - ;; SECONDARY1-NEXT: (drop - ;; SECONDARY1-NEXT: (global.get $e) - ;; SECONDARY1-NEXT: ) - ;; SECONDARY1-NEXT: ) (func $split1 (drop (global.get $e)) ) - ;; SECONDARY2: (type $0 (func)) - - ;; SECONDARY2: (import "primary" "global" (global $e i32)) - - ;; SECONDARY2: (func $split2 - ;; SECONDARY2-NEXT: (drop - ;; SECONDARY2-NEXT: (global.get $e) - ;; SECONDARY2-NEXT: ) - ;; SECONDARY2-NEXT: ) (func $split2 (drop (global.get $e)) ) ) + +;; PRIMARY: (module +;; PRIMARY-NEXT: (type $0 (func)) +;; PRIMARY-NEXT: (global $f i32 (i32.const 42)) +;; PRIMARY-NEXT: (global $e i32 (global.get $f)) +;; PRIMARY-NEXT: (export "global" (global $e)) +;; PRIMARY-NEXT: (func $keep (type $0) +;; PRIMARY-NEXT: (nop) +;; PRIMARY-NEXT: ) +;; PRIMARY-NEXT: ) + +;; SECONDARY1: (module +;; SECONDARY1-NEXT: (type $0 (func)) +;; SECONDARY1-NEXT: (import "primary" "global" (global $e i32)) +;; SECONDARY1-NEXT: (func $split1 (type $0) +;; SECONDARY1-NEXT: (drop +;; SECONDARY1-NEXT: (global.get $e) +;; SECONDARY1-NEXT: ) +;; SECONDARY1-NEXT: ) +;; SECONDARY1-NEXT: ) + +;; SECONDARY2: (module +;; SECONDARY2-NEXT: (type $0 (func)) +;; SECONDARY2-NEXT: (import "primary" "global" (global $e i32)) +;; SECONDARY2-NEXT: (func $split2 (type $0) +;; SECONDARY2-NEXT: (drop +;; SECONDARY2-NEXT: (global.get $e) +;; SECONDARY2-NEXT: ) +;; SECONDARY2-NEXT: ) +;; SECONDARY2-NEXT: ) diff --git a/test/lit/wasm-split/transitive-globals.wast b/test/lit/wasm-split/transitive-globals.wast index a277ec72605..ad702a4363b 100644 --- a/test/lit/wasm-split/transitive-globals.wast +++ b/test/lit/wasm-split/transitive-globals.wast @@ -19,29 +19,10 @@ (global $e i32 (global.get $f)) (global $d i32 (global.get $e)) - ;; PRIMARY: (global $f i32 (i32.const 42)) - ;; PRIMARY: (global $e i32 (global.get $f)) - - ;; PRIMARY: (export "global" (global $e)) - - ;; SECONDARY: (import "primary" "global" (global $e i32)) - - ;; SECONDARY: (global $c i32 (i32.const 42)) - ;; SECONDARY: (global $b i32 (global.get $c)) - ;; SECONDARY: (global $a i32 (global.get $b)) - - ;; SECONDARY: (global $d i32 (global.get $e)) - ;; This dead global is referring to a global ($a) that's moved to the ;; secondary module. This should be deleted. - ;; PRIMARY-NOT: (global (global $dead i32 (global.get $a)) (global $dead i32 (global.get $a)) - ;; PRIMARY: (func $keep - ;; PRIMARY-NEXT: (drop - ;; PRIMARY-NEXT: (global.get $e) - ;; PRIMARY-NEXT: ) - ;; PRIMARY-NEXT: ) (func $keep (drop (global.get $e) @@ -49,14 +30,6 @@ ) ;; Exclusively uses $a and $d, causing them to move to the secondary module - ;; SECONDARY: (func $split - ;; SECONDARY-NEXT: (drop - ;; SECONDARY-NEXT: (global.get $a) - ;; SECONDARY-NEXT: ) - ;; SECONDARY-NEXT: (drop - ;; SECONDARY-NEXT: (global.get $d) - ;; SECONDARY-NEXT: ) - ;; SECONDARY-NEXT: ) (func $split (drop (global.get $a) @@ -66,3 +39,32 @@ ) ) ) + +;; PRIMARY: (module +;; PRIMARY-NEXT: (type $0 (func)) +;; PRIMARY-NEXT: (global $f i32 (i32.const 42)) +;; PRIMARY-NEXT: (global $e i32 (global.get $f)) +;; PRIMARY-NEXT: (export "global" (global $e)) +;; PRIMARY-NEXT: (func $keep +;; PRIMARY-NEXT: (drop +;; PRIMARY-NEXT: (global.get $e) +;; PRIMARY-NEXT: ) +;; PRIMARY-NEXT: ) +;; PRIMARY-NEXT: ) + +;; SECONDARY: (module +;; SECONDARY-NEXT: (type $0 (func)) +;; SECONDARY-NEXT: (import "primary" "global" (global $e i32)) +;; SECONDARY-NEXT: (global $c i32 (i32.const 42)) +;; SECONDARY-NEXT: (global $b i32 (global.get $c)) +;; SECONDARY-NEXT: (global $a i32 (global.get $b)) +;; SECONDARY-NEXT: (global $d i32 (global.get $e)) +;; SECONDARY-NEXT: (func $split +;; SECONDARY-NEXT: (drop +;; SECONDARY-NEXT: (global.get $a) +;; SECONDARY-NEXT: ) +;; SECONDARY-NEXT: (drop +;; SECONDARY-NEXT: (global.get $d) +;; SECONDARY-NEXT: ) +;; SECONDARY-NEXT: ) +;; SECONDARY-NEXT: ) From f870c9e0558d0d058a903c3ab4ef170c1f9f1029 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 31 Aug 2026 16:19:53 -0700 Subject: [PATCH 07/52] ConstraintAnalysis: Fix a hang with a tee in an increment (#9058) We didn't look through the tee properly, and also did wasted work, since we can just stop at the first tee we see and use the value there. --- src/passes/ConstraintAnalysis.cpp | 41 ++++++++++---- .../lit/passes/constraint-analysis-loops.wast | 55 +++++++++++++++++++ 2 files changed, 86 insertions(+), 10 deletions(-) diff --git a/src/passes/ConstraintAnalysis.cpp b/src/passes/ConstraintAnalysis.cpp index fff4e4b8ed3..89a3584487c 100644 --- a/src/passes/ConstraintAnalysis.cpp +++ b/src/passes/ConstraintAnalysis.cpp @@ -568,14 +568,6 @@ struct ConstraintAnalysis return; } - // See above on binary action counting limits. - if (auto* binary = set->value->dynCast()) { - if (binaryActionCounts[binary]++ >= MaxBinaryActions) { - constraints.setProvesNothing(set->index); - return; - } - } - // Look at the fallthrough. It is valid to do so, because our constraints // only track two things, constants and locals. For a constant, it does // not change while falling through. For a local, the only way for the @@ -600,8 +592,37 @@ struct ConstraintAnalysis // opportunity to write any other value while falling through. (And, any // local.tee appearing here would have been reached earlier in the // traversal, and handled.) - auto* value = - Properties::getFallthrough(set->value, getPassOptions(), *getModule()); + auto* value = set->value; + while (1) { + if (value->is()) { + // We stop at the first tee: we don't need to look any further, and + // will just apply that local's values to ourselves, saving repeated + // work. + break; + } + auto* next = Properties::getImmediateFallthrough( + value, getPassOptions(), *getModule()); + if (value == next) { + break; + } else { + value = next; + } + } + + // Now that we know the value, check binary action counting limits (see + // above). + if (auto* binary = value->dynCast()) { + // The count may exceed the limit sometimes, but add a hard assert on + // never going up so high it is likely doing an unbounded computation. + auto& count = binaryActionCounts[binary]; + assert(count < MaxBinaryActions * 10); + count++; + if (count >= MaxBinaryActions) { + constraints.setProvesNothing(set->index); + return; + } + } + constraints.set(set->index, value); } } diff --git a/test/lit/passes/constraint-analysis-loops.wast b/test/lit/passes/constraint-analysis-loops.wast index 9c1e594f18e..7c66ee84429 100644 --- a/test/lit/passes/constraint-analysis-loops.wast +++ b/test/lit/passes/constraint-analysis-loops.wast @@ -1905,4 +1905,59 @@ ) ) ) + + ;; CHECK: (func $increment-tee (type $0) + ;; CHECK-NEXT: (local $x i32) + ;; CHECK-NEXT: (local $y i32) + ;; CHECK-NEXT: (loop $label1 + ;; CHECK-NEXT: (if + ;; CHECK-NEXT: (i32.gt_s + ;; CHECK-NEXT: (local.get $y) + ;; CHECK-NEXT: (local.get $x) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (then + ;; CHECK-NEXT: (unreachable) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (local.set $y + ;; CHECK-NEXT: (local.tee $x + ;; CHECK-NEXT: (i32.add + ;; CHECK-NEXT: (local.get $y) + ;; CHECK-NEXT: (i32.const 1) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (br $label1) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $increment-tee + (local $x i32) + (local $y i32) + ;; A loop, where $y is incremented but there is a tee in the middle. The loop + ;; is unbounded (the exit condition is never hit), so we must be careful to + ;; not keep calculating 1,2,3, without limit. The tee in the middle should not + ;; confuse us: we apply the +=1 operation to x directly, but y reads it + ;; through the tee. We should stop calculating anything about both rather than + ;; hang for a long time. + (loop $label1 + (if + (i32.gt_s + (local.get $y) + (local.get $x) + ) + (then + (unreachable) + ) + ) + (local.set $y + (local.tee $x + (i32.add + (local.get $y) + (i32.const 1) + ) + ) + ) + (br $label1) + ) + ) ) From 6531a981a86daf8c83ba7d933d824bab27f6e02a Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 31 Aug 2026 17:53:13 -0700 Subject: [PATCH 08/52] [wasm-split] Make mutable/immutable versions of tests (#9062) A follow-up PR will move immutable globals to secondary modules when possible, and it will make the test expectations of `transitive-globals-multi.wast` different for mutable and immutable globals. Creating a new test in that PR will make it different to see what changes in that PR. So this PR duplicates the test to make mutable and immutable versions. Note that `$f` can't be converted to mutable because it is used in a `global.get`. This also adds mutable/immutable versions of globals to `split-module-items.wast`. --- test/lit/wasm-split/split-module-items.wast | 56 +++++++++++++------ ...> transitive-immutable-globals-multi.wast} | 2 +- .../transitive-mutable-globals-multi.wast | 54 ++++++++++++++++++ 3 files changed, 93 insertions(+), 19 deletions(-) rename test/lit/wasm-split/{transitive-globals-multi.wast => transitive-immutable-globals-multi.wast} (92%) create mode 100644 test/lit/wasm-split/transitive-mutable-globals-multi.wast diff --git a/test/lit/wasm-split/split-module-items.wast b/test/lit/wasm-split/split-module-items.wast index 3816b50ce9b..b4a8b3db881 100644 --- a/test/lit/wasm-split/split-module-items.wast +++ b/test/lit/wasm-split/split-module-items.wast @@ -19,7 +19,8 @@ ;; This is only used in the secondary module, but segments $keep-data2 can trap ;; so it is pinned to the primary, so this will be too. (memory $keep-memory2 1 1) - (global $keep-global i32 (i32.const 20)) + (global $keep-immutable-global i32 (i32.const 20)) + (global $keep-mutable-global (mut i32) (i32.const 20)) (table $keep-table 1 1 funcref) ;; This is only used in the secondary module, but segments $keep-elem2 and ;; $keep-elem3 can trap so they are pinned to the primary, so this will be too. @@ -35,21 +36,25 @@ (data $keep-data2 (memory $keep-memory2) (i32.const 65536) "a") (memory $split-memory 1 1) - (global $split-global i32 (i32.const 20)) + (global $split-immutable-global i32 (i32.const 20)) + (global $split-mutable-global (mut i32) (i32.const 20)) (table $split-table 1 1 funcref) (tag $split-tag (param i32)) (elem $split-elem (table $split-table) (i32.const 0) funcref (item (ref.null nofunc))) (data $split-data (memory $split-memory) (i32.const 0) "a") (memory $shared-memory 1 1) - (global $shared-global i32 (i32.const 20)) + (global $shared-immutable-global i32 (i32.const 20)) + (global $shared-mutable-global (mut i32) (i32.const 20)) (table $shared-table 1 1 funcref) (tag $shared-tag (param i32)) (elem $shared-elem (table $shared-table) (i32.const 0) funcref (item (ref.null nofunc))) (data $shared-data (memory $shared-memory) (i32.const 0) "a") - ;; PRIMARY: (global $keep-global i32 (i32.const 20)) - ;; PRIMARY-NEXT: (global $shared-global i32 (i32.const 20)) + ;; PRIMARY: (global $keep-immutable-global i32 (i32.const 20)) + ;; PRIMARY-NEXT: (global $keep-mutable-global (mut i32) (i32.const 20)) + ;; PRIMARY-NEXT: (global $shared-immutable-global i32 (i32.const 20)) + ;; PRIMARY-NEXT: (global $shared-mutable-global (mut i32) (i32.const 20)) ;; PRIMARY-NEXT: (memory $keep-memory 1 1) ;; PRIMARY-NEXT: (memory $keep-memory2 1 1) ;; PRIMARY-NEXT: (memory $shared-memory 1 1) @@ -73,21 +78,24 @@ ;; PRIMARY-NEXT: (export "memory_1" (memory $shared-memory)) ;; PRIMARY-NEXT: (export "table" (table $keep-table2)) ;; PRIMARY-NEXT: (export "table_3" (table $shared-table)) - ;; PRIMARY-NEXT: (export "global" (global $shared-global)) + ;; PRIMARY-NEXT: (export "global" (global $shared-immutable-global)) + ;; PRIMARY-NEXT: (export "global_5" (global $shared-mutable-global)) ;; PRIMARY-NEXT: (export "tag" (tag $shared-tag)) ;; PRIMARY-NEXT: (export "keep" (func $keep)) - ;; PRIMARY-NEXT: (export "table_7" (table $3)) + ;; PRIMARY-NEXT: (export "table_8" (table $3)) ;; SECONDARY: (import "primary" "memory" (memory $keep-memory2 1 1)) ;; SECONDARY-NEXT: (import "primary" "memory_1" (memory $shared-memory 1 1)) ;; SECONDARY-NEXT: (import "primary" "table" (table $keep-table2 1 1 (ref null $2))) ;; SECONDARY-NEXT: (import "primary" "table_3" (table $shared-table 1 1 funcref)) - ;; SECONDARY-NEXT: (import "primary" "table_7" (table $timport$2 1 funcref)) - ;; SECONDARY-NEXT: (import "primary" "global" (global $shared-global i32)) + ;; SECONDARY-NEXT: (import "primary" "table_8" (table $timport$2 1 funcref)) + ;; SECONDARY-NEXT: (import "primary" "global" (global $shared-immutable-global i32)) + ;; SECONDARY-NEXT: (import "primary" "global_5" (global $shared-mutable-global (mut i32))) ;; SECONDARY-NEXT: (import "primary" "keep" (func $keep (exact (param i32) (result i32)))) ;; SECONDARY-NEXT: (import "primary" "tag" (tag $shared-tag (type $1) (param i32))) - ;; SECONDARY: (global $split-global i32 (i32.const 20)) + ;; SECONDARY: (global $split-immutable-global i32 (i32.const 20)) + ;; SECONDARY-NEXT: (global $split-mutable-global (mut i32) (i32.const 20)) ;; SECONDARY-NEXT: (memory $split-memory 1 1) ;; SECONDARY-NEXT: (data $split-data (memory $split-memory) (i32.const 0) "a") ;; SECONDARY-NEXT: (table $split-table 1 1 funcref) @@ -109,9 +117,12 @@ (i32.const 0) ) ) - ;; Uses $keep-global + ;; Uses $keep-immutable-global and $keep-mutable-global (drop - (global.get $keep-global) + (global.get $keep-immutable-global) + ) + (drop + (global.get $keep-mutable-global) ) ;; Uses $keep-tag (try_table (catch $keep-tag 0) @@ -130,9 +141,12 @@ (i32.const 0) ) ) - ;; Uses $shared-global + ;; Uses $shared-immutable-global and $shared-mutable-global + (drop + (global.get $shared-immutable-global) + ) (drop - (global.get $shared-global) + (global.get $shared-mutable-global) ) ;; Uses $shared-tag (try_table (catch $shared-tag 0) @@ -166,9 +180,12 @@ (drop (table.get $keep-table2 (i32.const 0)) ) - ;; Uses $split-global + ;; Uses $split-immutable-global and $shared-mutable-global (drop - (global.get $split-global) + (global.get $split-immutable-global) + ) + (drop + (global.get $split-mutable-global) ) ;; Uses $split-tag (try_table (catch $split-tag 0) @@ -187,9 +204,12 @@ (i32.const 0) ) ) - ;; Uses $shared-global + ;; Uses $shared-immutable-global and $shared-mutable-global + (drop + (global.get $shared-immutable-global) + ) (drop - (global.get $shared-global) + (global.get $shared-mutable-global) ) ;; Uses $shared-tag (try_table (catch $shared-tag 0) diff --git a/test/lit/wasm-split/transitive-globals-multi.wast b/test/lit/wasm-split/transitive-immutable-globals-multi.wast similarity index 92% rename from test/lit/wasm-split/transitive-globals-multi.wast rename to test/lit/wasm-split/transitive-immutable-globals-multi.wast index d1d6b73e61e..3f2cb97c392 100644 --- a/test/lit/wasm-split/transitive-globals-multi.wast +++ b/test/lit/wasm-split/transitive-immutable-globals-multi.wast @@ -1,4 +1,4 @@ -;; RUN: wasm-split -all -g --multi-split %s --manifest %s.manifest --out-prefix=%t -o %t.wasm +;; RUN: wasm-split -all -g --multi-split %s --manifest %S/transitive-globals-multi.wast.manifest --out-prefix=%t -o %t.wasm ;; RUN: wasm-dis -all %t.wasm | filecheck %s --check-prefix PRIMARY ;; RUN: wasm-dis -all %t1.wasm | filecheck %s --check-prefix SECONDARY1 ;; RUN: wasm-dis -all %t2.wasm | filecheck %s --check-prefix SECONDARY2 diff --git a/test/lit/wasm-split/transitive-mutable-globals-multi.wast b/test/lit/wasm-split/transitive-mutable-globals-multi.wast new file mode 100644 index 00000000000..1b297267fd0 --- /dev/null +++ b/test/lit/wasm-split/transitive-mutable-globals-multi.wast @@ -0,0 +1,54 @@ +;; RUN: wasm-split -all -g --multi-split %s --manifest %S/transitive-globals-multi.wast.manifest --out-prefix=%t -o %t.wasm +;; RUN: wasm-dis -all %t.wasm | filecheck %s --check-prefix PRIMARY +;; RUN: wasm-dis -all %t1.wasm | filecheck %s --check-prefix SECONDARY1 +;; RUN: wasm-dis -all %t2.wasm | filecheck %s --check-prefix SECONDARY2 + +;; Because global $e is used in both module1 ($split1) and module2 ($split2), $e +;; will be exported / imported, but we don't need to export $f. + +(module + (global $f i32 (i32.const 42)) + (global $e (mut i32) (global.get $f)) + + (func $keep + (nop) + ) + + (func $split1 + (drop (global.get $e)) + ) + + (func $split2 + (drop (global.get $e)) + ) +) + +;; PRIMARY: (module +;; PRIMARY-NEXT: (type $0 (func)) +;; PRIMARY-NEXT: (global $f i32 (i32.const 42)) +;; PRIMARY-NEXT: (global $e (mut i32) (global.get $f)) +;; PRIMARY-NEXT: (export "global" (global $e)) +;; PRIMARY-NEXT: (func $keep (type $0) +;; PRIMARY-NEXT: (nop) +;; PRIMARY-NEXT: ) +;; PRIMARY-NEXT: ) + +;; SECONDARY1: (module +;; SECONDARY1-NEXT: (type $0 (func)) +;; SECONDARY1-NEXT: (import "primary" "global" (global $e (mut i32))) +;; SECONDARY1-NEXT: (func $split1 (type $0) +;; SECONDARY1-NEXT: (drop +;; SECONDARY1-NEXT: (global.get $e) +;; SECONDARY1-NEXT: ) +;; SECONDARY1-NEXT: ) +;; SECONDARY1-NEXT: ) + +;; SECONDARY2: (module +;; SECONDARY2-NEXT: (type $0 (func)) +;; SECONDARY2-NEXT: (import "primary" "global" (global $e (mut i32))) +;; SECONDARY2-NEXT: (func $split2 (type $0) +;; SECONDARY2-NEXT: (drop +;; SECONDARY2-NEXT: (global.get $e) +;; SECONDARY2-NEXT: ) +;; SECONDARY2-NEXT: ) +;; SECONDARY2-NEXT: ) From d036a3b6c3a04c5d1aefe5a945e75ab113d7dcad Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 1 Sep 2026 14:10:50 -0700 Subject: [PATCH 09/52] Add missing visit to descriptor in LinearExecutionWalker (#9060) --- src/ir/linear-execution.h | 1 + test/lit/passes/simplify-locals-desc.wast | 77 ++++++++++++++++++++++- 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/src/ir/linear-execution.h b/src/ir/linear-execution.h index 9e69405ff7c..905160961c1 100644 --- a/src/ir/linear-execution.h +++ b/src/ir/linear-execution.h @@ -251,6 +251,7 @@ struct LinearExecutionWalker : public PostWalker { if (!self->connectAdjacentBlocks) { self->pushTask(SubType::doNoteNonLinear, currp); } + self->maybePushTask(SubType::scan, &curr->cast()->desc); self->pushTask(SubType::scan, &curr->cast()->ref); break; } diff --git a/test/lit/passes/simplify-locals-desc.wast b/test/lit/passes/simplify-locals-desc.wast index acd99538f40..a58b3980f12 100644 --- a/test/lit/passes/simplify-locals-desc.wast +++ b/test/lit/passes/simplify-locals-desc.wast @@ -11,7 +11,13 @@ (type $desc (describes $struct) (struct)) ) - ;; CHECK: (func $test (type $2) (param $ref (ref null $struct)) (result (ref $struct)) + ;; CHECK: (type $none (func)) + (type $none (func)) + + ;; CHECK: (tag $tag (type $none)) + (tag $tag (type $none)) + + ;; CHECK: (func $test (type $3) (param $ref (ref null $struct)) (result (ref $struct)) ;; CHECK-NEXT: (local $temp (ref $desc)) ;; CHECK-NEXT: (block $block (result (ref none)) ;; CHECK-NEXT: (drop @@ -49,5 +55,74 @@ (unreachable) ) ) + + ;; CHECK: (func $br_on_cast_desc_eq_in_block (type $4) (result (ref $struct)) + ;; CHECK-NEXT: (local $0 (ref null $desc)) + ;; CHECK-NEXT: (local $1 i32) + ;; CHECK-NEXT: (block $out (result (ref $struct)) + ;; CHECK-NEXT: (if + ;; CHECK-NEXT: (i32.const 0) + ;; CHECK-NEXT: (then + ;; CHECK-NEXT: (block $block + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (block (result i32) + ;; CHECK-NEXT: (drop + ;; CHECK-NEXT: (br_on_cast_desc_eq_fail $out (ref (exact $struct)) (ref $struct) + ;; CHECK-NEXT: (struct.new_default_desc $struct + ;; CHECK-NEXT: (ref.null none) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (try_table (result (ref $desc)) (catch $tag $block) + ;; CHECK-NEXT: (ref.as_non_null + ;; CHECK-NEXT: (local.get $0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (i32.const 0) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: (unreachable) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $br_on_cast_desc_eq_in_block (result (ref $struct)) + (local $0 (ref null $desc)) + (local $1 i32) + ;; While simplifying locals here, we must be aware that the br_on + ;; instruction has a descriptor, and must visit it. If we do not, then we'd + ;; see no branches to $block, and move the tee out of it, breaking + ;; validation. + (block $out (result (ref $struct)) + (if + (i32.const 0) + (then + (block $block + (drop + (local.tee $1 + (block (result i32) + (drop + (br_on_cast_desc_eq_fail $out (ref (exact $struct)) (ref $struct) + (struct.new_default_desc $struct + (ref.null none) + ) + (try_table (result (ref $desc)) (catch $tag $block) + (ref.as_non_null + (local.get $0) + ) + ) + ) + ) + (i32.const 0) + ) + ) + ) + ) + ) + ) + (unreachable) + ) + ) ) From 3d7eee7a4d2c1578f56eedc7164af4728611b7fb Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 1 Sep 2026 15:50:27 -0700 Subject: [PATCH 10/52] Increase ConstraintAnalysis limit on basic block computations (#9065) `10 * MaxBinaryActions` is far too low, as CFGs can be complex enough to hit that. Use something far, far higher, unlikely to ever be seen in practice, but enough to assert instead of hanging, in case we have a bug. --- src/passes/ConstraintAnalysis.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/passes/ConstraintAnalysis.cpp b/src/passes/ConstraintAnalysis.cpp index 89a3584487c..bd2d9a14867 100644 --- a/src/passes/ConstraintAnalysis.cpp +++ b/src/passes/ConstraintAnalysis.cpp @@ -612,10 +612,20 @@ struct ConstraintAnalysis // Now that we know the value, check binary action counting limits (see // above). if (auto* binary = value->dynCast()) { - // The count may exceed the limit sometimes, but add a hard assert on - // never going up so high it is likely doing an unbounded computation. + // The code below will stop calculating this binary once we pass + // MaxBinaryActions operations on it. That is enough to prevent + // unbounded work on this binary, however, we may end up reaching this + // basic block an even larger number of times for other reasons, i.e., + // just because of a very complex CFG. That should be very rare, but can + // happen. In debug builds we check we do not exceed a very high limit + // there, intending to throw an assert rather than just hang in the case + // of a bug (as assert is easier to diagnose, even if it happens after a + // long delay). auto& count = binaryActionCounts[binary]; - assert(count < MaxBinaryActions * 10); +#ifndef NDEBUG + static const Index MaxBasicBlockActions = 1024 * 1024; + assert(count < MaxBasicBlockActions); +#endif count++; if (count >= MaxBinaryActions) { constraints.setProvesNothing(set->index); From 20486056d457ed2167e6fbe9febbe904cac3581e Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Wed, 2 Sep 2026 03:28:37 -0700 Subject: [PATCH 11/52] Fix typos in the codebase (#9063) This fixes typos in the codebase using codespell. --- scripts/fuzz_opt.py | 6 +++--- scripts/test/fuzzing.py | 2 +- scripts/update_lit_checks.py | 2 +- src/binaryen-c.h | 8 ++++---- src/dataflow/node.h | 2 +- src/interpreter/interpreter.cpp | 2 +- src/ir/child-typer.h | 2 +- src/ir/manipulation.h | 2 +- src/ir/module-splitting.cpp | 2 +- src/ir/module-utils.cpp | 2 +- src/ir/subtype-exprs.h | 2 +- src/ir/type-updating.cpp | 2 +- src/passes/DeadArgumentElimination2.cpp | 2 +- src/passes/HeapStoreOptimization.cpp | 4 ++-- src/passes/Inlining.cpp | 6 +++--- src/passes/MergeBlocks.cpp | 2 +- src/passes/MultiMemoryLowering.cpp | 2 +- src/passes/OptimizeCasts.cpp | 2 +- src/passes/OptimizeInstructions.cpp | 6 +++--- src/passes/Print.cpp | 4 ++-- src/passes/TranslateEH.cpp | 2 +- src/passes/pass.cpp | 2 +- src/tools/fuzzing/fuzzing.cpp | 12 ++++++------ src/tools/wasm-fuzz-lattices.cpp | 2 +- src/tools/wasm-split/instrumenter.cpp | 2 +- src/wasm/wasm-ir-builder.cpp | 4 ++-- src/wasm/wasm-validator.cpp | 6 +++--- test/gtest/type-updating.cpp | 2 +- test/lit/basic/exception-handling-legacy.wast | 4 ++-- test/lit/ctor-eval/multivalue-local.wast | 2 +- test/lit/help/wasm-metadce.test | 2 +- test/lit/help/wasm-opt.test | 2 +- test/lit/help/wasm2js.test | 2 +- test/lit/passes/coalesce-locals.wast | 2 +- test/lit/passes/gto-removals.wast | 2 +- test/lit/passes/gufa-desc.wast | 2 +- test/lit/passes/gufa-tnh.wast | 2 +- test/lit/passes/inlining-eh-legacy.wast | 2 +- test/lit/passes/inlining-optimizing.wast | 2 +- test/lit/passes/inlining_optimize-level=3.wast | 2 +- test/lit/passes/once-reduction.wast | 2 +- test/lit/passes/optimize-casts.wast | 2 +- test/lit/passes/optimize-instructions-eh-legacy.wast | 2 +- test/lit/passes/post-emscripten.wast | 2 +- test/lit/passes/precompute-effects.wast | 2 +- test/lit/passes/precompute-gc-loop.wast | 2 +- .../remove-unused-module-elements_all-features.wast | 2 +- test/lit/passes/rse-eh-legacy.wast | 2 +- test/lit/passes/simplify-locals-gc.wast | 2 +- test/lit/passes/toolchain-inlining.wast | 4 ++-- test/lit/passes/type-generalizing.wast | 2 +- test/lit/passes/type-merging.wast | 2 +- test/lit/passes/type-ssa-desc.wast | 2 +- test/lit/passes/unsubtyping-jsinterop.wast | 2 +- test/lit/passes/unsubtyping-stack-switching.wast | 2 +- test/lit/scripts/extract_wasms.lit | 2 +- test/lit/wasm-split/multi-split2.wast | 2 +- test/spec/stack-switching/resume_throw.wast | 2 +- test/unit/test_cluster_fuzz.py | 2 +- 59 files changed, 80 insertions(+), 80 deletions(-) diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 77652a53971..bd2effe45b0 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -1008,7 +1008,7 @@ def __init__(self): D8(), D8Liftoff(), D8Turboshaft(), - # FIXME: Temprorary disable. See issue #4741 for more details + # FIXME: Temporary disable. See issue #4741 for more details # Wasm2C(), # Wasm2C2Wasm() ] @@ -1372,7 +1372,7 @@ def handle_pair(self, input, before_wasm, after_wasm, opts): # "[fuzz-exec] export bar". call_start = before.rfind(FUZZ_EXEC_EXPORT_PREFIX, 0, trap_index) if call_start < 0: - # the trap happened before we called an export, so it occured + # the trap happened before we called an export, so it occurred # during startup (the start function, or memory segment # operations, etc.). in that case there is nothing for us to # compare here; just leave. @@ -2575,7 +2575,7 @@ def handle(self, wasm): TrapsNeverHappen(), CtorEval(), Merge(), -# Split(), # Will reenable after stabilized +# Split(), # Will re-enable after stabilized RoundtripText(), ClusterFuzz(), Two(), diff --git a/scripts/test/fuzzing.py b/scripts/test/fuzzing.py index 1dafecfe570..0a020e24254 100644 --- a/scripts/test/fuzzing.py +++ b/scripts/test/fuzzing.py @@ -93,7 +93,7 @@ 'string-lifting-section.wast', # TODO: fuzzer support for uninhabitable imported globals 'exact-references.wast', - # We do not have full suppor for these imports in all parts of the fuzzer. + # We do not have full support for these imports in all parts of the fuzzer. 'instrument-branch-hints.wast', # Contains a subtype chain that exceeds depth limits. 'reorder-types-real.wast', diff --git a/scripts/update_lit_checks.py b/scripts/update_lit_checks.py index 1519ca00e73..0e6801e663c 100755 --- a/scripts/update_lit_checks.py +++ b/scripts/update_lit_checks.py @@ -167,7 +167,7 @@ def find_annotations(module, start): else: # Found something that isn't an annotation. break - # Look for the start of the line containin the first annoation. + # Look for the start of the line containing the first annotation. for i in range(annotation - 1, -1, -1): if module[i] == '\n': return i + 1 diff --git a/src/binaryen-c.h b/src/binaryen-c.h index a6bb2e0a6a4..119cf0b91ea 100644 --- a/src/binaryen-c.h +++ b/src/binaryen-c.h @@ -3724,10 +3724,10 @@ BINARYEN_API void RelooperAddBranchForSwitch(RelooperBlockRef from, BinaryenIndex numIndexes, BinaryenExpressionRef code); -// Generate structed wasm control flow from the CFG of blocks and branches that -// were created on this relooper instance. This returns the rendered output, and -// also disposes of the relooper and its blocks and branches, as they are no -// longer needed. +// Generate structured wasm control flow from the CFG of blocks and branches +// that were created on this relooper instance. This returns the rendered +// output, and also disposes of the relooper and its blocks and branches, as +// they are no longer needed. // @param labelHelper To render irreducible control flow, we may need a helper // variable to guide us to the right target label. This value should be // an index of an i32 local variable that is free for us to use. diff --git a/src/dataflow/node.h b/src/dataflow/node.h index d88134a2feb..c529f2040c2 100644 --- a/src/dataflow/node.h +++ b/src/dataflow/node.h @@ -55,7 +55,7 @@ struct Node { // in wasm) Expr, // a value represented by a Binaryen Expression Phi, // a phi from converging control flow - Cond, // a blockpc, representing one of the branchs for a Block + Cond, // a blockpc, representing one of the branches for a Block Block, // a source of phis Zext, // zero-extend an i1 (from an op where Souper returns i1 but wasm does // not, and so we need a special way to get back to an i32/i64 if we diff --git a/src/interpreter/interpreter.cpp b/src/interpreter/interpreter.cpp index d7f31a6ddf0..1b090569538 100644 --- a/src/interpreter/interpreter.cpp +++ b/src/interpreter/interpreter.cpp @@ -311,7 +311,7 @@ Result<> Interpreter::instantiate(Instance& instance) { return Ok{}; } -// This is a temporary convenience while stil using gTests to validate this +// This is a temporary convenience while still using gTests to validate this // interpreter. Once spec tests can run, this shall be deleted. std::vector Interpreter::runTest(Expression* root) { static std::shared_ptr dummyModule = std::make_shared(); diff --git a/src/ir/child-typer.h b/src/ir/child-typer.h index 27499b785fb..776280af488 100644 --- a/src/ir/child-typer.h +++ b/src/ir/child-typer.h @@ -83,7 +83,7 @@ template struct ChildTyper : OverriddenVisitor { } } - // Disambiguate betwween Type and VarType. + // Disambiguate between Type and VarType. void note(Expression** childp, Type::BasicType type) { note(childp, VarType{Type(type)}); } diff --git a/src/ir/manipulation.h b/src/ir/manipulation.h index dbb34edbe66..5058f82b972 100644 --- a/src/ir/manipulation.h +++ b/src/ir/manipulation.h @@ -21,7 +21,7 @@ namespace wasm::ExpressionManipulator { -// Re-use a node's memory. This helps avoid allocation when optimizing. +// Reuse a node's memory. This helps avoid allocation when optimizing. template inline OutputType* convert(InputType* input) { static_assert(sizeof(OutputType) <= sizeof(InputType), diff --git a/src/ir/module-splitting.cpp b/src/ir/module-splitting.cpp index b340ad5f874..67b361fb946 100644 --- a/src/ir/module-splitting.cpp +++ b/src/ir/module-splitting.cpp @@ -156,7 +156,7 @@ TableSlotManager::TableSlotManager( Module& module, const std::vector>& secondaries) : module(module), secondaries(secondaries) { // If possible, just create a new table to manage all primary-to-secondary - // calls lazily. Do not re-use slots for functions that will already be in + // calls lazily. Do not reuse slots for functions that will already be in // existing tables, since that is not correct in the face of table mutations. // However, do not do this for emscripten; its loader code (and dynamic // loading in particular) do not support this yet. diff --git a/src/ir/module-utils.cpp b/src/ir/module-utils.cpp index 8f3ee597c08..46dd332e102 100644 --- a/src/ir/module-utils.cpp +++ b/src/ir/module-utils.cpp @@ -358,7 +358,7 @@ struct TypeInfos { // Multivalue control flow structures need a function type, but the identity // of the function type (i.e. what recursion group it is in or whether it is - // final) doesn't matter. Save them for the end to see if we can re-use an + // final) doesn't matter. Save them for the end to see if we can reuse an // existing function type with the necessary signature. InsertOrderedMap controlFlowSignatures; diff --git a/src/ir/subtype-exprs.h b/src/ir/subtype-exprs.h index 2394fdd114a..0ed731e3b76 100644 --- a/src/ir/subtype-exprs.h +++ b/src/ir/subtype-exprs.h @@ -50,7 +50,7 @@ namespace wasm { // must be a subtype of the signature's // param. // * noteSubtype(Expression, Expression) - An expression's type must be a -// subtype of anothers, for example, +// subtype of another's, for example, // a block and its last child. // // * noteCast(HeapType, Type) - A fixed type is cast to another, for example, diff --git a/src/ir/type-updating.cpp b/src/ir/type-updating.cpp index d325e539a9a..2643e3ea3c6 100644 --- a/src/ir/type-updating.cpp +++ b/src/ir/type-updating.cpp @@ -78,7 +78,7 @@ updateIndirectCallEffects( // oldType has no entry, which means its effects are explicitly unknown. // Why? It's a source type in `typeMap`, so it must have appeared in // the module at some point, but GlobalEffects were never computed for it, - // or GlobalEffects intentionally ommitted its entry because it couldn't + // or GlobalEffects intentionally omitted its entry because it couldn't // determine its effects (e.g. if an import has that type). newTypes.insert(destType); newTypeEffects.erase(destType); diff --git a/src/passes/DeadArgumentElimination2.cpp b/src/passes/DeadArgumentElimination2.cpp index 4793789373a..4597ae76ef5 100644 --- a/src/passes/DeadArgumentElimination2.cpp +++ b/src/passes/DeadArgumentElimination2.cpp @@ -158,7 +158,7 @@ struct FunctionInfo { std::unordered_map forwardedToIndirectParams; // Locations forwarded to this function's result. These locations will become - // used if the result turns out ot be used. + // used if the result turns out to be used. std::vector resultSources; // For each parameter of this function, the list of locations that will become diff --git a/src/passes/HeapStoreOptimization.cpp b/src/passes/HeapStoreOptimization.cpp index 6c6e729e744..118c44998d9 100644 --- a/src/passes/HeapStoreOptimization.cpp +++ b/src/passes/HeapStoreOptimization.cpp @@ -165,8 +165,8 @@ struct HeapStoreOptimization bool trySwap(ExpressionList& list, Index i, Index j) { if (j == list.size() - 1) { // There is no reason to swap with the last element of the list as it - // won't match the pattern because there wont be anything after. This also - // avoids swapping an instruction that does not leave anything in the + // won't match the pattern because there won't be anything after. This + // also avoids swapping an instruction that does not leave anything in the // stack by one that could leave something, and that which would be // incorrect. return false; diff --git a/src/passes/Inlining.cpp b/src/passes/Inlining.cpp index eeee2d8b8b8..18fe7069038 100644 --- a/src/passes/Inlining.cpp +++ b/src/passes/Inlining.cpp @@ -837,9 +837,9 @@ struct FunctionSplitter { // // Note that to avoid wasteful work, this function may return "Full" inlining // mode instead of a split inlining. That is, if it detects that a partial - // inlining will trigger a follow up full inline of the splitted function - // then it will instead return "InliningMode::Full" directly. In more detail, - // imagine we have + // inlining will trigger a follow up full inline of the split function then it + // will instead return "InliningMode::Full" directly. In more detail, imagine + // we have // // foo(10); // diff --git a/src/passes/MergeBlocks.cpp b/src/passes/MergeBlocks.cpp index 7010d6d15f7..59f125cc61f 100644 --- a/src/passes/MergeBlocks.cpp +++ b/src/passes/MergeBlocks.cpp @@ -236,7 +236,7 @@ static bool hasDeadCode(Block* block) { } // Given a dropped block, see if we can simplify it by optimizing the drop into -// the block, removing the return value while doin so. Returns whether we +// the block, removing the return value while doing so. Returns whether we // succeeded. static bool optimizeDroppedBlock(Drop* drop, Block* block, diff --git a/src/passes/MultiMemoryLowering.cpp b/src/passes/MultiMemoryLowering.cpp index 7a106410a84..ffc489df7bf 100644 --- a/src/passes/MultiMemoryLowering.cpp +++ b/src/passes/MultiMemoryLowering.cpp @@ -604,7 +604,7 @@ struct MultiMemoryLowering : public Pass { builder.makeReturn(builder.makeConst(-1)))); // If we are not growing the last memory, then we need to copy data, - // shifting it over to accomodate the increase from page_delta + // shifting it over to accommodate the increase from page_delta if (!isLastMemory(memIdx)) { // This offset is the starting pt for copying auto offsetGlobalName = getOffsetGlobal(memIdx + 1); diff --git a/src/passes/OptimizeCasts.cpp b/src/passes/OptimizeCasts.cpp index a6ea8fa2ac2..25852027a0c 100644 --- a/src/passes/OptimizeCasts.cpp +++ b/src/passes/OptimizeCasts.cpp @@ -315,7 +315,7 @@ struct EarlyCastFinder // (ref.cast $B (ref.cast $B (local.get $x))) // // We initially choose to move the inner ref.cast $B. When we consider the - // outer ref.cast $B, we can see that it has the same type as tge existing + // outer ref.cast $B, we can see that it has the same type as the existing // ref.cast $B, so we ignore it. // // Case 4: diff --git a/src/passes/OptimizeInstructions.cpp b/src/passes/OptimizeInstructions.cpp index aa093530543..5577cee97a5 100644 --- a/src/passes/OptimizeInstructions.cpp +++ b/src/passes/OptimizeInstructions.cpp @@ -1717,7 +1717,7 @@ struct OptimizeInstructions if (auto* select = ref->dynCast