wasm-micro-runtime/core/iwasm/aot
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 Enable platform support for esp-idf v5.0.1 (#2050) 2023-03-23 17:29:57 +08:00
debug Fix AOT debug for macOS (#1494) 2022-09-16 18:54:04 +08:00
aot_intrinsic.c Register missing symbols for f32 to 64 bit integer conversion (#1850) 2022-12-30 15:21:25 +08:00
aot_intrinsic.h Implement i32.div_s (#1792) 2022-12-13 10:48:51 +08:00
aot_loader.c Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
aot_reloc.h Register missing symbols for f32 to 64 bit integer conversion (#1850) 2022-12-30 15:21:25 +08:00
aot_runtime.c Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
aot_runtime.h Use pre-created exec_env for instantiation and module_malloc/free (#2047) 2023-03-23 19:19:47 +08:00
iwasm_aot.cmake Implement source debugging for interpreter and AOT (#769) 2021-09-29 13:36:46 +08:00
SConscript Add ia32 support and fix compiling issue for RT-Thread (#730) 2021-09-07 10:20:14 +08:00