wasm-micro-runtime/core/iwasm/common
Wenyong Huang 76be848ec3
Implement the segue optimization for LLVM AOT/JIT (#2230)
Segue is an optimization technology which uses x86 segment register to store
the WebAssembly linear memory base address, so as to remove most of the cost
of SFI (Software-based Fault Isolation) base addition and free up a general
purpose register, by this way it may:
- Improve the performance of JIT/AOT
- Reduce the footprint of JIT/AOT, the JIT/AOT code generated is smaller
- Reduce the compilation time of JIT/AOT

This PR uses the x86-64 GS segment register to apply the optimization, currently
it supports linux and linux-sgx platforms on x86-64 target. By default it is disabled,
developer can use the option below to enable it for wamrc and iwasm(with LLVM
JIT enabled):
```bash
wamrc --enable-segue=[<flags>] -o output_file wasm_file
iwasm --enable-segue=[<flags>] wasm_file [args...]
```
`flags` can be:
    i32.load, i64.load, f32.load, f64.load, v128.load,
    i32.store, i64.store, f32.store, f64.store, v128.store
Use comma to separate them, e.g. `--enable-segue=i32.load,i64.store`,
and `--enable-segue` means all flags are added.

Acknowledgement:
Many thanks to Intel Labs, UC San Diego and UT Austin teams for introducing this
technology and the great support and guidance!

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
Co-authored-by: Vahldiek-oberwagner, Anjo Lucas <anjo.lucas.vahldiek-oberwagner@intel.com>
2023-05-26 10:13:33 +08:00
..
arch Add support for universal binaries on OSX (#2060) 2023-03-30 09:53:07 +08:00
iwasm_common.cmake Add support for universal binaries on OSX (#2060) 2023-03-30 09:53:07 +08:00
SConscript Add ia32 support and fix compiling issue for RT-Thread (#730) 2021-09-07 10:20:14 +08:00
wasm_application.c Use pre-created exec_env for instantiation and module_malloc/free (#2047) 2023-03-23 19:19:47 +08:00
wasm_c_api_internal.h wasm-c-api: Fix init/destroy thread env multiple times issue (#1766) 2022-12-05 11:16:14 +08:00
wasm_c_api.c Fix three multi-threading and wasm-c-api-imports issues (#2173) 2023-05-05 10:01:58 +08:00
wasm_exec_env.c Fix multi-threading issues (#2013) 2023-03-08 10:57:22 +08:00
wasm_exec_env.h Merge branch main into dev/wasi_threads 2023-02-17 08:46:12 +08:00
wasm_memory.c Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
wasm_memory.h Add/reorganize locks for thread synchronization (#1995) 2023-03-04 08:15:26 +08:00
wasm_native.c Merge branch main into dev/wasi_threads 2023-02-17 08:46:12 +08:00
wasm_native.h Add wasm_runtime_unregister_natives (#1647) 2022-10-28 11:03:39 +08:00
wasm_runtime_common.c Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
wasm_runtime_common.h Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
wasm_shared_memory.c Fix compile warnings on windows platform (#2208) 2023-05-15 13:48:48 +08:00
wasm_shared_memory.h Fix atomic.wait, get wasi_ctx exit code and thread mgr issues (#2024) 2023-03-15 07:47:36 +08:00