WebAssembly Micro Runtime (WAMR)
Go to file
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
.devcontainer Upgrade toolkits (#1878) 2023-02-02 09:42:25 +08:00
.github Add asan and ubsan to WAMR CI (#2161) 2023-05-26 09:45:37 +08:00
assembly-script Update request.ts wasm_response_send signature (#2122) 2023-04-12 16:50:11 +08:00
build-scripts Add asan and ubsan to WAMR CI (#2161) 2023-05-26 09:45:37 +08:00
ci Dockerfile lint errors fix (#1493) 2022-09-22 13:06:11 +08:00
core Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
doc A few changes related to WAMRC_LLC_COMPILER (#2218) 2023-05-17 09:56:35 +08:00
language-bindings The Python language-binding needs python>=3.9 (#2228) 2023-05-24 08:15:28 +08:00
product-mini Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
samples Add asan and ubsan to WAMR CI (#2161) 2023-05-26 09:45:37 +08:00
test-tools Fix wamr-ide debugger ignoring launch config (#2155) 2023-05-10 12:47:43 +08:00
tests Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
wamr-compiler Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
wamr-sdk Readme refactoring (#2038) 2023-03-19 08:05:57 +08:00
zephyr zephyr: add module.yml and fix riscv compile error (#763) 2021-09-24 17:43:02 +08:00
.clang-format Customize clang-format coding styles based on Mozilla template (#770) 2021-10-06 09:54:36 +08:00
.clang-tidy Customize clang-format coding styles based on Mozilla template (#770) 2021-10-06 09:54:36 +08:00
.gitignore Add internal tests for socket apis (#1900) 2023-03-09 12:31:06 +08:00
ATTRIBUTIONS.md Implement the segue optimization for LLVM AOT/JIT (#2230) 2023-05-26 10:13:33 +08:00
CMakeLists.txt Fix several issues found (#1996) 2023-03-03 15:00:54 +08:00
CODE_OF_CONDUCT.md Restore some files and fix minor issues of SGX platform (#144) 2019-11-21 10:30:57 +08:00
CONTRIBUTING.md Restore some files and fix minor issues of SGX platform (#144) 2019-11-21 10:30:57 +08:00
LICENSE Remove unused files and update license header of some files (#138) 2019-11-11 20:38:49 -06:00
ORG_CODE_OF_CONDUCT.md Recover files deleted accidentally in last commit (#143) 2019-11-20 21:31:43 +08:00
README.md Fix URL in README.md (#2168) 2023-05-03 14:21:34 +08:00
RELEASE_NOTES.md Update version number and release notes (#2213) 2023-05-16 12:39:22 +08:00
SConscript Add ia32 support and fix compiling issue for RT-Thread (#730) 2021-09-07 10:20:14 +08:00
SECURITY.md Refer to BA security policy (#635) 2021-05-19 19:59:23 +08:00
TSC_Charter.md Implement most missing wasm-c-api APIs (#303) (#676) 2021-07-28 21:53:37 +08:00

WebAssembly Micro Runtime

A Bytecode Alliance project

GuideWebsiteChat

Build WAMR | Build AOT Compiler | Embed WAMR | Export Native API | Build Wasm Apps | Samples

WebAssembly Micro Runtime (WAMR) is a lightweight standalone WebAssembly (Wasm) runtime with small footprint, high performance and highly configurable features for applications cross from embedded, IoT, edge to Trusted Execution Environment (TEE), smart contract, cloud native and so on. It includes a few parts as below:

  • VMcore: A set of runtime libraries for loading and running Wasm modules. It supports several execution modes including interpreter, Ahead-of-Time compilation(AoT) and Just-in-Time compilation (JIT). The WAMR supports two JIT tiers - Fast JIT, LLVM JIT, and dynamic tier-up from Fast JIT to LLVM JIT.
  • iwasm: The executable binary built with WAMR VMcore supports WASI and command line interface.
  • wamrc: The AOT compiler to compile Wasm file into AOT file
  • Useful components and tools for building real solutions with WAMR vmcore:
    • App-framework: A framework for supporting APIs for the Wasm applications
    • App-manager: a framework for dynamical loading the Wasm module remotely
    • WAMR-IDE: An experimental VSCode extension for developping WebAssembly applications with C/C++

Key features

Wasm post-MVP features

Supported architectures and platforms

The WAMR VMcore supports the following architectures:

  • X86-64, X86-32
  • ARM, THUMB (ARMV7 Cortex-M7 and Cortex-A15 are tested)
  • AArch64 (Cortex-A57 and Cortex-A53 are tested)
  • RISCV64, RISCV32 (RISC-V LP64 and RISC-V LP64D are tested)
  • XTENSA, MIPS, ARC

The following platforms are supported, click each link below for how to build iwasm on that platform. Refer to WAMR porting guide for how to port WAMR to a new platform.

Getting started

Performance and memory

Project Technical Steering Committee

The WAMR PTSC Charter governs the operations of the project TSC. The current TSC members:

License

WAMR uses the same license as LLVM: the Apache 2.0 license with the LLVM exception. See the LICENSE file for details. This license allows you to freely use, modify, distribute and sell your own products based on WAMR. Any contributions you make will be under the same license.

More resources