diff options
author | Morten Sørvig <morten.sorvig@qt.io> | 2023-01-27 17:31:10 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-07 12:57:32 +0000 |
commit | 23283a144be2a1ff8a6760fc3f0d1bd3f6d6ff34 (patch) | |
tree | 32cd1b9f6367df004566e94a1637bcedb096b11f | |
parent | 359dbedf9822fe685d93cd5c118723dc8137f81c (diff) | |
download | qtdoc-23283a144be2a1ff8a6760fc3f0d1bd3f6d6ff34.tar.gz |
wasm: update SIMD documentation
We now have a configure option -feature-wasm-simd128
which enables WebAssembly SIMD at compile and link
time.
Change-Id: I5073f40d032ff4a87800ad4ba0984471ebfedd2e
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit f0583fe5c020a1279f46d7821fc0d0f8bf284f51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | doc/src/platforms/wasm.qdoc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/doc/src/platforms/wasm.qdoc b/doc/src/platforms/wasm.qdoc index e65fce25..19b124d2 100644 --- a/doc/src/platforms/wasm.qdoc +++ b/doc/src/platforms/wasm.qdoc @@ -369,17 +369,21 @@ be enabled provided the web server sets the COOP and and COEP headers: \section2 SIMD -The LLVM compiler supports generating \l{https://emscripten.org/docs/porting/simd.html}{WebAssembly SIMD}. -Pass the -msimd128 flag at compile time to enable. This enables LLVM auto-vectorization, which -makes it possible to benefit from SIMD without making source code modifications. +Emscripten supports \l{https://emscripten.org/docs/porting/simd.html}{WebAssembly SIMD}, which +provides 128-bit SIMD types and operations for WebAssembly. + +Build Qt from source and configure with the -feature-wasm-simd128 flag to enable; this will pass the +-msimd128 flag at compile and link time. Note that Qt does not contain wasm-simd optimized +code paths at this point, however enabling wasm-simd will enable compiler auto-vectorization +where the compiler can use the SIMD instructions. You can target WebAssembly SIMD directly using either GCC/Clang SIMD Vector Extensions or WASM SIMD128 intrinsics. For more information, see the Emscripten \l{https://emscripten.org/docs/porting/simd.html}{ SIMD documentation }. In addition, Emscripten supports emulating/translating x86 SSE instructions to Wasm SIMD instructions. -This emulation is no longer supported in Qt 6.5, as the use of SSE SIMD instructions that have no native -Wasm SIMD equivalent may cause reduced performance. +Qt does not use this emulation, as the use of SSE SIMD instructions that have no native Wasm SIMD +equivalent may cause reduced performance. Note that SIMD-enabled binaries are incompatible with browsers that do not support WebAssembly SIMD, also if the SIMD code paths are not called at run-time. SIMD support may need to be enabled |