wasm-micro-runtime/core/iwasm/compilation
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
..
debug core/iwasm/compilation/debug/dwarf_extractor.cpp: remove dead code (#1507) 2022-09-20 14:43:29 +08:00
simd Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
aot_compiler.c Fix multi-threading issues (#2013) 2023-03-08 10:57:22 +08:00
aot_compiler.h Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
aot_emit_aot_file.c Refactor LLVM JIT (#1613) 2022-10-18 20:17:34 +08:00
aot_emit_compare.c Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_compare.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_const.c Refactor interpreter/AOT module instance layout (#1559) 2022-10-18 10:59:28 +08:00
aot_emit_const.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_control.c Implement Fast JIT multi-threading feature (#2134) 2023-04-20 10:09:34 +08:00
aot_emit_control.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_conversion.c Simplify fcmp intrinsic logic for AOT/XIP (#1881) 2023-01-12 12:05:53 +08:00
aot_emit_conversion.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_exception.c Refactor interpreter/AOT module instance layout (#1559) 2022-10-18 10:59:28 +08:00
aot_emit_exception.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_function.c aot_compile_op_call: Remove a wrong optimization (#2233) 2023-05-25 07:44:54 +08:00
aot_emit_function.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_memory.c Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
aot_emit_memory.h Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
aot_emit_numberic.c Return result directly if float cmp is called in AOT XIP (#1851) 2022-12-30 16:45:39 +08:00
aot_emit_numberic.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_parametric.c Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_parametric.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_table.c Refine Fast JIT call indirect and call native process (#1620) 2022-10-19 17:11:38 +08:00
aot_emit_table.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_emit_variable.c core/iwasm/compilation: constify a bit (#2223) 2023-05-20 11:55:02 +08:00
aot_emit_variable.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
aot_llvm_extra.cpp Refine AOT exception check when function return (#1752) 2022-11-30 20:18:28 +08:00
aot_llvm_extra2.cpp wamrc: Add --stack-usage option (#2158) 2023-04-28 13:56:44 +08:00
aot_llvm_extra2.h wamrc: Add --stack-usage option (#2158) 2023-04-28 13:56:44 +08:00
aot_llvm.c Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
aot_llvm.h Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
aot_orc_extra.cpp Refactor LLVM JIT (#1613) 2022-10-18 20:17:34 +08:00
aot_orc_extra.h Refactor LLVM JIT (#1613) 2022-10-18 20:17:34 +08:00
aot.c Enable emitting custom name section to aot file (#794) 2021-10-26 16:32:52 +08:00
aot.h Report error in instantiation when meeting unlinked import globals (#1859) 2023-01-06 15:24:11 +08:00
iwasm_compl.cmake Implement atomic and memset/memmove/memcpy intrinsic for riscv (#841) 2021-11-30 17:10:14 +08:00