Commit Graph

24 Commits

Author SHA1 Message Date
Wenyong Huang
e87a554616
Refactor LLVM JIT (#1613)
Refactor LLVM JIT for some purposes:
- To simplify the source code of JIT compilation
- To simplify the JIT modes
- To align with LLVM latest changes
- To prepare for the Multi-tier JIT compilation, refer to #1302

The changes mainly include:
- Remove the MCJIT mode, replace it with ORC JIT eager mode
- Remove the LLVM legacy pass manager (only keep the LLVM new pass manager)
- Change the lazy mode's LLVM module/function binding:
  change each function in an individual LLVM module into all functions in a single LLVM module
- Upgraded ORC JIT to ORCv2 JIT to enable lazy compilation

Refer to #1468
2022-10-18 20:17:34 +08:00
Xu Jun
826cf4f8e1
Fix threads spec test issues (#1586) 2022-10-13 13:53:09 +08:00
Wenyong Huang
3220ff6941
Clear Windows compile warnings (#1530) 2022-09-29 14:02:58 +08:00
Christian Clauss
fa736d1ee9
Fix syntax errors and undefined names in Python code (#1515) 2022-09-27 15:57:08 +08:00
Wenyong Huang
bf28030993
Import WAMR Fast JIT (#1343)
Import WAMR Fast JIT which is a lightweight JIT with quick startup, small footprint,
relatively good performance (~40% to ~50% of LLVM JIT) and good portability.

Platforms supported: Linux, MacOS and Linux SGX.
Arch supported: x86-64.
2022-08-02 16:03:50 +08:00
Wenyong Huang
625d59191d
Update spec cases to latest version (#1253)
Update spec cases of mvp/threads to latest version, update wabt
to 1.0.29. And enhance the wasm loader.
2022-06-28 16:05:16 +08:00
Xu Jun
1705ae569b
Update spec test script (#1227) 2022-06-15 11:07:39 +08:00
Wenyong Huang
5264ce4118
Fix issues reported by klocwork (#1060)
Fix issues reported by klocwork, fix host_tool compile error,
and update build script of benchmark jetstream
2022-03-24 17:34:22 +08:00
Wenyong Huang
4bc6074273
Add benchmarks (#979)
Add scripts to build and run benchmark of coremark, polybench,
sightglass and jetstream2. And add documents.
2022-01-25 10:52:48 +08:00
Wenyong Huang
cb51dbb513
Fix some issues on MacOS platform (#937)
Fix some issues on MacOS platform
- Enable libc-wasi by default
- Set target abi to "gnu" if it is not set for wamrc to avoid generating
  object file of unsupported Mach-O format
- Set `<vendor>-<sys>` info according to target abi for wamrc to support
  generating AOT file for other OSs but not current host
- Set cpu name if arch/abi/cpu are not set to avoid checking SIMD
  capability failed
- Set size level to 1 for MacOS/Windows platform to avoid relocation type
  unsupported warning
- Clear posix_memmap.c compiling warning
- Fix spec case test script issues, enable test spec cases on MacOS

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2022-01-07 09:53:48 +08:00
liang.he
e70867c64f
Update spec test cases to latest version (#889)
Update spec test cases to commit 2460ad02b51fb5ed5824f44de287a8638b19a5f8,
and modify wamr test suite script as the SIMD cases have been added into spec
main repo by default, no need to clone SIMD repo again when testing SIMD.
2021-12-15 14:39:54 +08:00
Wenyong Huang
b490a229f6
Enhance XIP and add XIP document (#863)
Auto detect whether file is XIP file before loading module in posix like and
linux-sgx platforms, and if yes, mmap executable memory automatically to
run the XIP file.
Add document about XIP feature.
Enable test spec cases with XIP feature.
2021-12-06 17:25:10 +08:00
liang.he
1dccf39d16
Enable ref types and bulk memory by default for wamrc (#838)
Enable ref types feature and bulk memory feature by default for wamrc
and provide "--disable-ref-types", "--disable-bulk-memory"  to disable
them.
And remove the ref_type_flag option in wasm_loader.c which is used to
control whether to enable ref types or not when ENABLE_REF_TYPES
macro is enabled in wamrc. As the wasm binary format with ref types
is compatible with the binary format before, we can remove the option.
Also update the spec test scripts.
2021-11-18 17:42:49 +08:00
Wenyong Huang
a1ad950ae1
Enable LLVM link time optimization (LTO) for AOT (#831)
Enable LLVM link time optimization for AOT and enable it by default,
and provide "wamrc --disable-llvm-lto" option to disable it.
And modify the spec test script, disable it by default when testing
spec cases.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-11-13 16:59:35 +08:00
liang.he
5b62fdd061
[skip ci] reorder options of test_wamr.sh (#824) 2021-11-10 09:41:42 +08:00
liang.he
487072a78e
Speed up the spec case test by parallelism (#819)
Port spec-test-script/all.sh to spec-test-script/all.py and enable to run
spec cases with multiple threads parallelly:
- It reduces spec_test.yml from ~14min to ~9min and reduces
  compilation_on_sgx.yml from ~18min to ~12min
- run `./test_wamr.sh` will keep the same experience likes before by default
- run `./test_wamr.sh -P` will enable parallelism mode
- in parallelism mode, all.py will be in a less-output mode. It only outputs
  the last words of failed cases and will not output logs for those passed
2021-11-08 12:39:02 +08:00
Wenyong Huang
4d14e41ce9
Build projects in wamr-test-suites with multiple cores (#811)
Build several projects in wamr-test-suites with multiple cores to reduce
the compilation time.
2021-10-30 21:03:46 +08:00
liang.he
b46b663c16
Enhance spec test workflow to support x86_32 target (#787)
Enable test spec cases on x86_32 target when PR is created.
And Format shell script with [shellfmt](https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format).
2021-10-15 17:05:07 +08:00
liang.he
250aba6874
Sync up with wabt latest modification (#296) (#786)
- Remove "--enable-reference-types" and "--enable-bulk-memory" for wat2wasm
to support finished proposals.

- Ignore invalid module in the thread spec repo:
``` wast
;; my_elem.wast
(module
  (table $t 10 funcref)
  (func $f)
  (elem $t (i32.const 0) 0)
  (elem $t (i32.const 0) $f $f)
  (elem $t (offset (i32.const 0)) $f $f)
)
```

run with reference interpreter under spec/interpreter:
``` shell
$ ./wasm ../../../my_elem.wast
../../../my_elem.wast:5.9-5.11: syntax error: duplicate elem segment $t
```

- use a specific commit instead of the latest commit on the thread spec repo
2021-10-14 15:48:45 +08:00
Wenyong Huang
03494f9487
Refactor CI rules: merge ubuntu/macos/android, enable spec test (#777)
Refactor CI rules:
- merge ubuntu/macos/android into one job file
- add job file to test spec cases
- add compilation for lazy jit, debug interpreter and debug aot
- add compilation for performance profile, dump call stack and mini-loader
- re-org llvm build script to build lldb

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-10-11 20:32:29 +08:00
Wenyong Huang
52b6c73d9c
Apply clang-format for more src files and update spec test script (#775)
Apply clang-format for core/iwasm/include, core/iwasm/common and
core/iwasm/aot files.

Update spec cases test script:
- Checkout latest commit of https://github.com/WebAssembly/spec
- Checkout main branch but not master of https://github.com/WebAssembly/threads
- Update wabt to latest version

And update source debugging document.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-10-08 17:47:11 +08:00
Wenyong Huang
b5a67cb91e
Fix several issues of document, spec test script and simd (#767)
Fix document issues: add ARC to supported targets, fix how to build wamrc for MacOS.
Fix spec case test script issue: the latest wabt has enabled simd by default, no need to
add "--enable-simd" option for test script.
Fix simd LLVM IR compilation issue: using index calculated by opcode to access array
element should not be out of array boundary, add bh_assert() for it.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-09-29 11:13:38 +08:00
YAMAMOTO Takashi
ea835db54c
Enable wamr-test-suites on MacOS (#740) 2021-09-10 10:11:46 +08:00
Wenyong Huang
00663f0cd5
Import test suites to test spec cases (#736) 2021-09-09 12:49:46 +08:00