1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
|
;; RUN: wasm-reduce --help | filecheck %s
;; CHECK: ================================================================================
;; CHECK-NEXT: wasm-reduce INFILE
;; CHECK-NEXT:
;; 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:
;; CHECK-NEXT:
;; 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-NEXT: the command's return code and stdout here
;; 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-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-NEXT: best result at the end)
;; CHECK-NEXT:
;; 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-NEXT: suffix)
;; CHECK-NEXT:
;; CHECK-NEXT: --denan Avoid nans when reducing
;; CHECK-NEXT:
;; CHECK-NEXT: --verbose,-v Verbose output mode
;; CHECK-NEXT:
;; 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-NEXT: succeed
;; CHECK-NEXT:
;; 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-NEXT: --enable-all)
;; CHECK-NEXT:
;; CHECK-NEXT:
;; CHECK-NEXT: Tool options:
;; CHECK-NEXT: -------------
;; 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-relaxed-simd Enable relaxed SIMD
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-relaxed-simd Disable relaxed SIMD
;; CHECK-NEXT:
;; CHECK-NEXT: --enable-extended-const Enable extended const expressions
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-extended-const Disable extended const expressions
;; CHECK-NEXT:
;; CHECK-NEXT: --enable-strings Enable strings
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-strings Disable strings
;; CHECK-NEXT:
;; CHECK-NEXT: --enable-multimemory Enable multimemory
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-multimemory Disable multimemory
;; CHECK-NEXT:
;; CHECK-NEXT: --enable-typed-continuations Enable typed continuations
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-typed-continuations Disable typed continuations
;; CHECK-NEXT:
;; CHECK-NEXT: --enable-shared-everything Enable shared-everything threads
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-shared-everything Disable shared-everything threads
;; CHECK-NEXT:
;; CHECK-NEXT: --enable-fp16 Enable float 16 operations
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-fp16 Disable float 16 operations
;; CHECK-NEXT:
;; CHECK-NEXT: --enable-typed-function-references Deprecated compatibility flag
;; CHECK-NEXT:
;; CHECK-NEXT: --disable-typed-function-references Deprecated compatibility flag
;; 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. 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: 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-NEXT: inspect their contents or call them.
;; CHECK-NEXT:
;; CHECK-NEXT: --preserve-type-order Preserve the order of types from the
;; CHECK-NEXT: input (useful for debugging and testing)
;; CHECK-NEXT:
;; CHECK-NEXT: --generate-stack-ir generate StackIR during writing
;; CHECK-NEXT:
;; CHECK-NEXT: --optimize-stack-ir optimize StackIR during writing
;; CHECK-NEXT:
;; CHECK-NEXT: --print-stack-ir print StackIR during writing
;; CHECK-NEXT:
;; CHECK-NEXT:
;; CHECK-NEXT: General options:
;; CHECK-NEXT: ----------------
;; 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:
|