Commit Graph

158 Commits

Author SHA1 Message Date
losfair
9ed5094f86 Resolve semantics for more values. 2019-08-01 23:28:39 +08:00
losfair
0a7f95ee06 Allow a range of instruction offsets to be used in ip lookup. 2019-07-30 22:25:15 +08:00
losfair
efb5277d1d Stack parsing now works with LLVM. 2019-07-27 02:50:49 +08:00
losfair
cc4f0e31a6 TwoHalves & trying to get cowsay to compile again 2019-07-25 02:44:28 +08:00
losfair
0133b92bec Populating LLVM stack maps into MSM/FSM. 2019-07-23 02:55:43 +08:00
losfair
2e030c9c4a Parsing LLVM stackmaps. 2019-07-19 02:02:15 +08:00
losfair
a14a8e4c50 Emit stack map at critical points. 2019-07-18 02:43:04 +08:00
Mark McCaskey
19f544e489 update to 0.5.6 2019-07-16 13:12:21 -07:00
nlewycky
278adf678a
Merge branch 'master' into nlewycky/llvm 2019-07-11 16:48:46 -07:00
Nick Lewycky
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
Nick Lewycky
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
Johan Andersson
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
bors[bot]
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
Nick Lewycky
7f00dc3cdb Reformat. 2019-07-10 15:33:32 -07:00
Nick Lewycky
8faff26c31 Give float_bits bitcast instruction a name. 2019-07-10 15:31:18 -07:00
Nick Lewycky
1e86e32d40 Use bitcast instead of alloca+load+ptrcast+store sequence. 2019-07-10 10:24:14 -07:00
Mark McCaskey
4752492974 update version numbers to 0.5.5 2019-07-09 17:43:04 -07:00
Mark McCaskey
99ebb782dc update to version 0.5.4 2019-07-05 13:35:55 -07:00
losfair
a3dcc0e240 Merge remote-tracking branch 'origin/master' into feature/osr 2019-07-04 23:56:45 +08:00
Mark McCaskey
535da4c34a update to version 0.5.3 for wapm bug fix 2019-07-03 14:35:39 -07:00
Mark McCaskey
83da82d844 update for release wasmer 0.5.2 2019-07-02 14:13:45 -07:00
Nick Lewycky
b8f0292c0a Update to wasmpaser 0.32.1. 2019-07-02 10:00:19 -07:00
Nick Lewycky
adb257a40f Reformat. 2019-07-01 16:15:13 -07:00
Nick Lewycky
9fc713f9b1 Update for new wasmparser.rs version. 2019-07-01 16:11:38 -07:00
Nick Lewycky
fe38cc915b Update to newer cranelift which also requires an update to wasmparser 0.31.0. 2019-07-01 15:27:17 -07:00
losfair
650f67a339 Merge remote-tracking branch 'origin/master' into feature/osr 2019-07-01 21:15:35 +08:00
losfair
967027003d Full preemptive snapshot/resume. 2019-06-27 15:49:43 +08:00
Nick Lewycky
70247a0c6e Simplify construction of floating point constants. 2019-06-25 16:05:22 -07:00
Nick Lewycky
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
Mark McCaskey
09177ac3ae update version numbers to 0.5.1, add changelog entry 2019-06-24 12:45:40 -07:00
Mark McCaskey
7bdfb2be51 update version numbers and changelog for 0.5.0 2019-06-17 12:56:28 -07:00
losfair
69944c1dc2 Fix ctx layout in LLVM. 2019-06-05 02:13:10 +08:00
Brandon Fish
66f9049a06 Reset LLVM related code to master 2019-06-02 19:36:26 -05:00
Brandon Fish
995ecefa92 Cargo fmt 2019-06-02 09:49:21 -05:00
losfair
8019505e65 Merge remote-tracking branch 'origin/feature/clif-cgapi' into feature/metering 2019-05-31 15:40:05 +08:00
losfair
b834b4ff36 Metering for LLVM. 2019-05-31 15:36:08 +08:00
losfair
fd8675324c Merge remote-tracking branch 'origin/master' into feature/metering 2019-05-29 11:16:05 +08:00
Brandon Fish
8069cdac16 Merge branch 'master' into feature/clif-cgapi 2019-05-26 12:04:45 -05:00
Brandon Fish
6ca311f92d Fix compilation errors and warnings 2019-05-26 11:13:37 -05:00
Johan Andersson
8018453266 Update wasmparser 0.29.2 -> 0.30.0 2019-05-24 23:18:08 +02:00
losfair
9919dd73c8 Merge remote-tracking branch 'origin/master' into feature/metering 2019-05-23 20:18:11 +08:00
Brandon Fish
04d6ccc95c Pass module info to FCG as Arc 2019-05-21 23:44:31 -05:00
Brandon Fish
e34e625009 Implement MCG.next_function in other backends 2019-05-19 11:45:16 -05:00
Syrus
4ddffb8285 Update libraries versions to 0.4.2 2019-05-16 14:39:13 -07:00
losfair
6aa87a0bbf Add the internals field and necessary structures for metering. 2019-05-17 01:10:21 +08:00
losfair
fac4c452c6 Fix LLVM backend. 2019-05-14 18:49:02 +08:00
Brandon Fish
2aefa731a6 Add deny for unreachable patterns and unused unsafe 2019-05-12 00:33:02 -05:00
Brandon Fish
85158ac22a Add some initial deny for unused_imports and unused_variables
Additional unused variable fix on unix

Remove unused import on unix

Remove unused windows import
2019-05-11 09:23:25 -05:00
Brandon Fish
54095fcd67 Clean up commented out code in LLVM codegen 2019-05-07 22:53:48 -05:00
losfair
e53d5a91ca Remove transmutes. 2019-05-07 19:20:18 +08:00