Commit Graph

370 Commits

Author SHA1 Message Date
fe2bd6ad6c Add missing names to LLVM instructions. 2019-07-23 13:19:27 -07:00
ad7e3b52d3 Prepare for release of 0.5.7 2019-07-23 11:20:59 -07:00
18307bb79c Improve panic/unreachable/unimplemented usage. Refactor a little. 2019-07-22 12:15:56 -07:00
0133b92bec Populating LLVM stack maps into MSM/FSM. 2019-07-23 02:55:43 +08:00
775c120b38 Update to newer wasmerio/wabt-rs. 2019-07-19 15:48:50 -07:00
cd25356858 Fix shuffle and enable tests. Add support for new load_splat instructions.
Updates to wasmparser 0.34.0 and picks up a newer wasmerio/wabt.
2019-07-19 15:19:58 -07:00
3e009c5971 Reformat. 2019-07-18 13:40:24 -07:00
3be6a024aa Fix bugs in V128 support based on results from testing against simd spec test.
These is one test failure remaining with V128 global variables.

* Fix trunc_sat. We need both the largest float that can be converted to an int
  and the largest int, they are not the same number.
* Implement calling of functions that take V128 by passing in two i64's.
* Improve support for V128 in spectests. Parse binary modules with the same
  features as the outer spectest. Fix compilation error involving Result in
  emitted .rs file. Handle V128 in more cases when producing .rs file. Parse
  the wast script with SIMD enabled.
* Adjust the WAVM spectest so that it parses with WABT and mostly passes with
  wasmer. Wabt is particular about ints not having decimal places and floats
  having decimal places. Wasmer does not support mutable globals or shared
  memory. Tests of shuffles are disabled. Some assert_invalid tests that wabt
  won't even parse are disabled.
2019-07-18 12:52:59 -07:00
2e030c9c4a Parsing LLVM stackmaps. 2019-07-19 02:02:15 +08:00
a14a8e4c50 Emit stack map at critical points. 2019-07-18 02:43:04 +08:00
eeac6d5d2d Merge branch 'master' of github.com:wasmerio/wasmer into simd 2019-07-16 19:16:45 -07:00
19f544e489 update to 0.5.6 2019-07-16 13:12:21 -07:00
278adf678a Merge branch 'master' into nlewycky/llvm 2019-07-11 16:48:46 -07:00
7fb88251d4 Simplify trap_if_not_representable_as_int.
Fix typo in function name. Use two fcmp instructions instead of unpacking the bits of the IEEE float and using integer arithmetic to determine details about its value.
2019-07-11 16:46:37 -07:00
7045030532 Try a new list of optimization passes.
A few notes:
a) the inliner doesn't help because all the calls are indirect and not even opt -O2 can figure out which functions they're actually calling.
b) aggressive instruction combining is not a super-set of the instruction combiner. Instcombine is made up of a large number (probably 10,000s) of patterns, and some particularly slow ones were taken out and moved to the aggressive instruction combiner. Aggressive instcombine *only* runs that handful of optimizations, which fired zero times on our example wasm files.
c) NewGVN is not ready for production, it has asserts that fire when building sqlite or cowsay. This is why sqlite didn't build with the llvm backend.
d) Scalar-replacement-of-aggregates (sroa) is a strict superset of promote-memory-to-registers (mem2reg), and you probably want sroa because it's usually faster. It also fires 10,000s more times than mem2reg on lua.wasm.
e) Aggressive-dead-code-elimination was only deleting as much regular dead-code-elimination, but is slower because it depends on a postdominator tree (PDT) analysis that. Other passes don't need PDT so we'll have to build it for just this one pass (as opposed to regular dominator-tree which is reused by many passes). I've replaced this with bit-tracking dead-code-elimination which deletes more code than dce/adce.
2019-07-11 14:48:07 -07:00
b41040cc59 Update to nix 0.14.
Instead of using a mix of nix 0.12 & 0.13
2019-07-11 12:28:56 +02:00
0c4a8f77d2 Merge #543 #544
543: update version numbers to 0.5.5 r=MarkMcCaskey a=MarkMcCaskey



544: Use bitcast instead of alloca+load+ptrcast+store sequence. r=MarkMcCaskey a=nlewycky



Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: nlewycky <nick@wasmer.io>
2019-07-11 00:51:31 +00:00
7f00dc3cdb Reformat. 2019-07-10 15:33:32 -07:00
8faff26c31 Give float_bits bitcast instruction a name. 2019-07-10 15:31:18 -07:00
e4123433a1 Reformat. 2019-07-10 14:28:07 -07:00
53907b0ab2 Update inkwell to our own copy until upstream supports LLVM 8.
LLVM 8 support from https://github.com/lumen/inkwell/tree/llvm8 .
2019-07-10 14:23:47 -07:00
bb30434392 This .into_iter() call is equivalent to .iter() and will not move the array. 2019-07-10 13:54:36 -07:00
fdc13563b8 Initial implementation of SIMD in the LLVM backend. 2019-07-10 13:54:32 -07:00
77afcea9dc Add V128 stubs to allow LLVM backend to build again. 2019-07-10 13:48:12 -07:00
0a1bdd449e Update to @llvm.minimum/@llvm.maximum which requires LLVM 8.
The @llvm.minnum/@llvm.maxnum intrinsics don't produce correct (for wasm) outputs in all cases.
2019-07-10 13:48:12 -07:00
ea83924547 Update to LLVM 8.0. 2019-07-10 13:48:12 -07:00
b8d2aee80f Update wabt to 0.8 release. 2019-07-10 13:48:12 -07:00
1e86e32d40 Use bitcast instead of alloca+load+ptrcast+store sequence. 2019-07-10 10:24:14 -07:00
4752492974 update version numbers to 0.5.5 2019-07-09 17:43:04 -07:00
99ebb782dc update to version 0.5.4 2019-07-05 13:35:55 -07:00
a3dcc0e240 Merge remote-tracking branch 'origin/master' into feature/osr 2019-07-04 23:56:45 +08:00
535da4c34a update to version 0.5.3 for wapm bug fix 2019-07-03 14:35:39 -07:00
83da82d844 update for release wasmer 0.5.2 2019-07-02 14:13:45 -07:00
b8f0292c0a Update to wasmpaser 0.32.1. 2019-07-02 10:00:19 -07:00
adb257a40f Reformat. 2019-07-01 16:15:13 -07:00
9fc713f9b1 Update for new wasmparser.rs version. 2019-07-01 16:11:38 -07:00
fe38cc915b Update to newer cranelift which also requires an update to wasmparser 0.31.0. 2019-07-01 15:27:17 -07:00
650f67a339 Merge remote-tracking branch 'origin/master' into feature/osr 2019-07-01 21:15:35 +08:00
967027003d Full preemptive snapshot/resume. 2019-06-27 15:49:43 +08:00
70247a0c6e Simplify construction of floating point constants. 2019-06-25 16:05:22 -07:00
55394b4f06 Void type in llvm may only be used as a function return type. You may not form a pointer to void or use it as a structure member.
Fixes assertion failure initializing llvm backend.
2019-06-25 16:05:22 -07:00
09177ac3ae update version numbers to 0.5.1, add changelog entry 2019-06-24 12:45:40 -07:00
7bdfb2be51 update version numbers and changelog for 0.5.0 2019-06-17 12:56:28 -07:00
69944c1dc2 Fix ctx layout in LLVM. 2019-06-05 02:13:10 +08:00
66f9049a06 Reset LLVM related code to master 2019-06-02 19:36:26 -05:00
995ecefa92 Cargo fmt 2019-06-02 09:49:21 -05:00
8019505e65 Merge remote-tracking branch 'origin/feature/clif-cgapi' into feature/metering 2019-05-31 15:40:05 +08:00
b834b4ff36 Metering for LLVM. 2019-05-31 15:36:08 +08:00
fd8675324c Merge remote-tracking branch 'origin/master' into feature/metering 2019-05-29 11:16:05 +08:00
8069cdac16 Merge branch 'master' into feature/clif-cgapi 2019-05-26 12:04:45 -05:00