wasm-micro-runtime/core/shared/platform/linux-sgx
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
..
untrusted linux-sgx: Allow to open files with arbitrary paths in the sandbox using IPFS (#1685) 2022-11-07 19:56:16 +08:00
platform_internal.h Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
sgx_file.c linux-sgx: Allow to open files with arbitrary paths in the sandbox using IPFS (#1685) 2022-11-07 19:56:16 +08:00
sgx_file.h linux-sgx: Allow to open files with arbitrary paths in the sandbox using IPFS (#1685) 2022-11-07 19:56:16 +08:00
sgx_ipfs.c SGX IPFS: Fix a segfault and support seeking beyond the end of files while using SEEK_CUR/SEEK_END (#1916) 2023-01-30 08:24:12 +08:00
sgx_ipfs.h linux-sgx: Allow to open files with arbitrary paths in the sandbox using IPFS (#1685) 2022-11-07 19:56:16 +08:00
sgx_platform.c Add bh_print_proc_mem() to dump memory info of current process (#1734) 2022-11-25 08:33:44 +08:00
sgx_pthread.c Apply clang-format for core/shared and product-mini files (#785) 2021-10-14 09:12:07 +08:00
sgx_pthread.h Apply clang-format for core/shared and product-mini files (#785) 2021-10-14 09:12:07 +08:00
sgx_rsrv_mem_mngr.h Apply clang-format for core/shared and product-mini files (#785) 2021-10-14 09:12:07 +08:00
sgx_signal.c Apply clang-format for core/shared and product-mini files (#785) 2021-10-14 09:12:07 +08:00
sgx_signal.h Apply clang-format for core/shared and product-mini files (#785) 2021-10-14 09:12:07 +08:00
sgx_socket.c esp-idf: Add socket support for esp-idf platform (#1364) 2022-11-02 18:02:58 +08:00
sgx_socket.h esp-idf: Add socket support for esp-idf platform (#1364) 2022-11-02 18:02:58 +08:00
sgx_thread.c Implement pthread_cond_broadcast wrapper for lib-pthread (#982) 2022-01-25 09:28:02 +08:00
sgx_time.c Implement os_time_get_boot_microsecond() for sgx platform (#818) 2021-11-06 15:58:21 +08:00
sgx_time.h Apply clang-format for core/shared and product-mini files (#785) 2021-10-14 09:12:07 +08:00
sgx_wamr.edl linux-sgx: Allow to open files with arbitrary paths in the sandbox using IPFS (#1685) 2022-11-07 19:56:16 +08:00
shared_platform.cmake Add macro to exclude sgx wasi/pthread ocalls if not needed (#384) 2020-09-15 15:49:09 +08:00