diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2021-10-15 17:37:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-16 00:37:23 +0000 |
commit | 0bec0a4bbaf4859bb4c7a2f1c4ecda60ccab72f2 (patch) | |
tree | ce9ad99518d896956260e7f27a56eba0b8a5f7fd /test/lit/help | |
parent | 980bb397fa713385d7e0a7f1ddc0318a3da7234c (diff) | |
download | binaryen-0bec0a4bbaf4859bb4c7a2f1c4ecda60ccab72f2.tar.gz binaryen-0bec0a4bbaf4859bb4c7a2f1c4ecda60ccab72f2.tar.bz2 binaryen-0bec0a4bbaf4859bb4c7a2f1c4ecda60ccab72f2.zip |
Add a --structural flag (#4252)
Just as the --nominal flag forces all types to be parsed as nominal, the
--structural flag forces all types to be parsed as equirecursive. This is the
current default behavior, but a future PR will change the default to parse types
as either structural or nominal according to their syntax or encoding. This new
flag will then be necessary to get the current behavior.
Also take this opportunity to deduplicate more flags in the help tests.
Diffstat (limited to 'test/lit/help')
-rw-r--r-- | test/lit/help/optimization-opts.test | 14 | ||||
-rw-r--r-- | test/lit/help/tool-opts.test | 19 | ||||
-rw-r--r-- | test/lit/help/wasm-as.test | 13 | ||||
-rw-r--r-- | test/lit/help/wasm-ctor-eval.test | 13 | ||||
-rw-r--r-- | test/lit/help/wasm-dis.test | 13 | ||||
-rw-r--r-- | test/lit/help/wasm-emscripten-finalize.test | 13 | ||||
-rw-r--r-- | test/lit/help/wasm-metadce.test | 13 | ||||
-rw-r--r-- | test/lit/help/wasm-reduce.test | 98 | ||||
-rw-r--r-- | test/lit/help/wasm-split.test | 13 |
9 files changed, 38 insertions, 171 deletions
diff --git a/test/lit/help/optimization-opts.test b/test/lit/help/optimization-opts.test index db55e2bdc..34559ab0a 100644 --- a/test/lit/help/optimization-opts.test +++ b/test/lit/help/optimization-opts.test @@ -98,9 +98,13 @@ ;; CHECK-NEXT: optimization passes being run. ;; CHECK-NEXT: Must be in the form KEY@VALUE ;; CHECK-NEXT: -;; CHECK-NEXT: --nominal Use the prototype nominal type -;; CHECK-NEXT: system instead of the normal -;; CHECK-NEXT: equirecursive type system. +;; CHECK-NEXT: --nominal Force all GC type definitions to +;; CHECK-NEXT: be parsed as nominal. +;; CHECK-NEXT: +;; CHECK-NEXT: --structural Force all GC type definitions to +;; CHECK-NEXT: be parsed as structural (i.e. +;; CHECK-NEXT: equirecursive). This is the +;; CHECK-NEXT: default. ;; CHECK-NEXT: ;; CHECK-NEXT: -O execute default optimization ;; CHECK-NEXT: passes @@ -314,7 +318,7 @@ ;; CHECK-NEXT: inside basic blocks ;; CHECK-NEXT: ;; CHECK-NEXT: --local-subtyping apply more specific subtypes to -;; CHECK-NEXT: locals where possible +;; CHECK-NEXT: locals where possible ;; CHECK-NEXT: ;; CHECK-NEXT: --log-execution instrument the build with ;; CHECK-NEXT: logging of where execution goes @@ -371,7 +375,7 @@ ;; CHECK-NEXT: load/store offsets, propagating ;; CHECK-NEXT: them across locals too ;; CHECK-NEXT: -;; CHECK-NEXT: --optimize-for-js early optimize of the +;; CHECK-NEXT: --optimize-for-js early optimize of the ;; CHECK-NEXT: instruction combinations for js ;; CHECK-NEXT: ;; CHECK-NEXT: --optimize-instructions optimizes instruction diff --git a/test/lit/help/tool-opts.test b/test/lit/help/tool-opts.test index 2d3007779..100f5705d 100644 --- a/test/lit/help/tool-opts.test +++ b/test/lit/help/tool-opts.test @@ -3,6 +3,7 @@ ;; RUN: wasm-dis --help | filecheck %s ;; RUN: wasm-emscripten-finalize --help | filecheck %s ;; RUN: wasm-metadce --help | filecheck %s +;; RUN: wasm-reduce --help | filecheck %s ;; RUN: wasm-split --help | filecheck %s wasm-as INFILE @@ -84,3 +85,21 @@ wasm-as INFILE ;; CHECK-NEXT: --enable-gc-nn-locals Enable GC non-null locals ;; CHECK-NEXT: ;; CHECK-NEXT: --disable-gc-nn-locals Disable GC non-null locals +;; CHECK-NEXT: +;; CHECK-NEXT: --enable-relaxed-simd Enable relaxed SIMD +;; CHECK-NEXT: +;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD +;; CHECK-NEXT: +;; 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 +;; CHECK-NEXT: +;; CHECK-NEXT: --nominal Force all GC type definitions to be +;; CHECK-NEXT: parsed as nominal. +;; CHECK-NEXT: +;; CHECK-NEXT: --structural Force all GC type definitions to be +;; CHECK-NEXT: parsed as structural (i.e. +;; CHECK-NEXT: equirecursive). This is the default. diff --git a/test/lit/help/wasm-as.test b/test/lit/help/wasm-as.test index 4bf8f4494..5d07976a3 100644 --- a/test/lit/help/wasm-as.test +++ b/test/lit/help/wasm-as.test @@ -7,18 +7,7 @@ ;; Skip standard tool options -;; CHECK: --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 -;; CHECK-NEXT: -;; CHECK-NEXT: --nominal Use the prototype nominal type system -;; CHECK-NEXT: instead of the normal equirecursive type -;; CHECK-NEXT: system. -;; CHECK-NEXT: -;; CHECK-NEXT: --output,-o Output file (stdout if not specified) +;; CHECK: --output,-o Output file (stdout if not specified) ;; CHECK-NEXT: ;; CHECK-NEXT: --validate,-v Control validation of the output module ;; CHECK-NEXT: diff --git a/test/lit/help/wasm-ctor-eval.test b/test/lit/help/wasm-ctor-eval.test index da10f098a..7f292e188 100644 --- a/test/lit/help/wasm-ctor-eval.test +++ b/test/lit/help/wasm-ctor-eval.test @@ -7,18 +7,7 @@ ;; Skip standard tool options -;; CHECK: --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 -;; CHECK-NEXT: -;; CHECK-NEXT: --nominal Use the prototype nominal type system -;; CHECK-NEXT: instead of the normal equirecursive type -;; CHECK-NEXT: system. -;; CHECK-NEXT: -;; CHECK-NEXT: --output,-o Output file (stdout if not specified) +;; CHECK: --output,-o Output file (stdout if not specified) ;; CHECK-NEXT: ;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for the ;; CHECK-NEXT: output file diff --git a/test/lit/help/wasm-dis.test b/test/lit/help/wasm-dis.test index 47fcc4e2f..3cad5dc28 100644 --- a/test/lit/help/wasm-dis.test +++ b/test/lit/help/wasm-dis.test @@ -8,18 +8,7 @@ ;; Skip standard tool options -;; CHECK: --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 -;; CHECK-NEXT: -;; CHECK-NEXT: --nominal Use the prototype nominal type system -;; CHECK-NEXT: instead of the normal equirecursive type -;; CHECK-NEXT: system. -;; CHECK-NEXT: -;; CHECK-NEXT: --output,-o Output file (stdout if not specified) +;; CHECK: --output,-o Output file (stdout if not specified) ;; CHECK-NEXT: ;; CHECK-NEXT: --source-map,-sm Consume source map from the specified ;; CHECK-NEXT: file to add location information diff --git a/test/lit/help/wasm-emscripten-finalize.test b/test/lit/help/wasm-emscripten-finalize.test index 52a5ba701..b22954546 100644 --- a/test/lit/help/wasm-emscripten-finalize.test +++ b/test/lit/help/wasm-emscripten-finalize.test @@ -7,18 +7,7 @@ ;; Skip standard tool options -;; CHECK: --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 -;; CHECK-NEXT: -;; CHECK-NEXT: --nominal Use the prototype nominal type system -;; CHECK-NEXT: instead of the normal equirecursive type -;; CHECK-NEXT: system. -;; CHECK-NEXT: -;; CHECK-NEXT: --output,-o Output file +;; CHECK: --output,-o Output file ;; CHECK-NEXT: ;; CHECK-NEXT: --debuginfo,-g Emit names section in wasm binary (or ;; CHECK-NEXT: full debuginfo in wast) diff --git a/test/lit/help/wasm-metadce.test b/test/lit/help/wasm-metadce.test index 1a8255346..3d542e254 100644 --- a/test/lit/help/wasm-metadce.test +++ b/test/lit/help/wasm-metadce.test @@ -49,18 +49,7 @@ ;; Skip standard tool options -;; CHECK: --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 -;; CHECK-NEXT: -;; CHECK-NEXT: --nominal Use the prototype nominal type system -;; CHECK-NEXT: instead of the normal equirecursive type -;; CHECK-NEXT: system. -;; CHECK-NEXT: -;; CHECK-NEXT: --output,-o Output file (stdout if not specified) +;; CHECK: --output,-o Output file (stdout if not specified) ;; CHECK-NEXT: ;; CHECK-NEXT: --emit-text,-S Emit text instead of binary for the ;; CHECK-NEXT: output file diff --git a/test/lit/help/wasm-reduce.test b/test/lit/help/wasm-reduce.test index 3d6894d89..88969ecc9 100644 --- a/test/lit/help/wasm-reduce.test +++ b/test/lit/help/wasm-reduce.test @@ -5,100 +5,10 @@ ;; CHECK-NEXT: Reduce a wasm file to a smaller one that has the same behavior on a given ;; CHECK-NEXT: command ;; CHECK-NEXT: -;; CHECK-NEXT: Options: -;; CHECK-NEXT: -;; CHECK-NEXT: --version Output version information and exit -;; CHECK-NEXT: -;; CHECK-NEXT: --help,-h Show this help message and exit -;; CHECK-NEXT: -;; CHECK-NEXT: --debug,-d Print debug information to stderr -;; CHECK-NEXT: -;; CHECK-NEXT: --mvp-features,-mvp Disable all non-MVP features -;; CHECK-NEXT: -;; CHECK-NEXT: --all-features,-all Enable all features -;; CHECK-NEXT: -;; CHECK-NEXT: --detect-features (deprecated - this flag does nothing) -;; CHECK-NEXT: -;; 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-NEXT: purposes. -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-sign-ext Enable sign extension operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-sign-ext Disable sign extension operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-threads Enable atomic operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-threads Disable atomic operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-mutable-globals Enable mutable globals -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-mutable-globals Disable mutable globals -;; CHECK-NEXT: -;; 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-NEXT: operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-simd Enable SIMD operations and types -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-simd Disable SIMD operations and types -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-bulk-memory Enable bulk memory operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-bulk-memory Disable bulk memory operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-exception-handling Enable exception handling operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-exception-handling Disable exception handling operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-tail-call Enable tail call operations -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-tail-call Disable tail call operations -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-reference-types Enable reference types -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-reference-types Disable reference types -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-multivalue Enable multivalue functions -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-multivalue Disable multivalue functions -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-gc Enable garbage collection -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-gc Disable garbage collection -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-memory64 Enable memory64 -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-memory64 Disable memory64 -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-typed-function-references Enable typed function references -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-typed-function-references Disable typed function references -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-gc-nn-locals Enable GC non-null locals -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-gc-nn-locals Disable GC non-null locals -;; CHECK-NEXT: -;; CHECK-NEXT: --enable-relaxed-simd Enable relaxed SIMD -;; CHECK-NEXT: -;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD -;; CHECK-NEXT: -;; 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 -;; CHECK-NEXT: -;; CHECK-NEXT: --nominal Use the prototype nominal type system -;; CHECK-NEXT: instead of the normal equirecursive type -;; CHECK-NEXT: system. -;; CHECK-NEXT: -;; CHECK-NEXT: --command,-cmd The command to run on the test, that we + +;; Skip standard tool options + +;; CHECK: --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 diff --git a/test/lit/help/wasm-split.test b/test/lit/help/wasm-split.test index fe48e5e25..bb4acbd28 100644 --- a/test/lit/help/wasm-split.test +++ b/test/lit/help/wasm-split.test @@ -10,18 +10,7 @@ ;; Skip standard tool options -;; CHECK: --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 -;; CHECK-NEXT: -;; CHECK-NEXT: --nominal Use the prototype nominal type system -;; CHECK-NEXT: instead of the normal equirecursive type -;; CHECK-NEXT: system. -;; CHECK-NEXT: -;; CHECK-NEXT: --split Split an input module into two output +;; CHECK: --split Split an input module into two output ;; CHECK-NEXT: modules. The default mode. ;; CHECK-NEXT: ;; CHECK-NEXT: --instrument Instrument an input module to allow it to |