Nick Lewycky
31a77b0eb7
Fix llvm backend to work with latest inkwell.
...
cargo update to pick up latest inkwell branch commit.
Add lifetime annotations to Module which now takes a lifetime, and more lifetime annotations across intrinsics.rs.
Add <'ctx> to missing places in CtxType and Intrinsics. Remove it from reference bindings.
Use ManuallyDrop to ensure that context's members are dropped before the Context.
Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-11-26 19:59:03 -08:00
Nick Lewycky
3ef9f769df
Fix TBAA crash with LLVM + the gas middleware.
2019-11-22 17:03:31 -08:00
Ivan Enderlin
95706160ee
Merge branch 'master' into feat-runtime-core-clos-host-function
2019-11-12 00:55:40 +01:00
Ivan Enderlin
bb81614be4
feat(llvm-backend) Update ImportedFunc
structure.
...
`vm::ImportedFunc` in `runtime-core` has changed. Update LLVM accordingly.
2019-11-12 00:52:14 +01:00
Nick Lewycky
2957b6abd8
Emit direct calls for local functions, but not for imports.
2019-11-08 14:44:50 -08:00
Nick Lewycky
dccaa3a285
Apply TBAA to the correct instruction.
...
Another instance of the bug in PR #933 .
2019-11-07 12:42:29 -08:00
Nick Lewycky
203efd0c06
Apply TBAA to the correct instruction.
...
Caught by LLVM verifier complaining about !tbaa on a getelementptr.
2019-11-06 23:25:39 -08:00
Nick Lewycky
1d8f2b767d
Build Metadata using the current Context.
...
Fixes #927 . Reverts #928 .
2019-11-04 15:27:38 -08:00
Nick Lewycky
c0c7661c65
Merge branch 'master' of github.com:wasmerio/wasmer into feature/llvm-tbaa
2019-11-01 17:53:52 -07:00
Nick Lewycky
132757ee9d
Fix leak. Only create one NamedMDNode for each name.
2019-11-01 17:49:45 -07:00
Nick Lewycky
ef4b3c3428
Improve some TBAA label names, particular for memory.
...
Memory can't change between static and dynamic, so use that in the TBAA label
name.
Distinguish between local and imported memory, table and globals.
2019-10-31 12:40:32 -07:00
Nick Lewycky
0ba686ffc6
Improve wording a little.
2019-10-31 11:50:33 -07:00
Nick Lewycky
88427c9696
Add some comments.
2019-10-31 11:48:52 -07:00
Nick Lewycky
15ce8bfda7
Label the loads in intrinsics.rs, most of which are the initial accesses off the context.
...
Move tbaa_label to intrinsics.rs. Move TBAA pass to first in the list, it doesn't get invalidated. Add TBAA labels for internal fields.
2019-10-30 16:18:36 -07:00
Nick Lewycky
9224db6d1e
Don't emit bounds checks when the offset is less than the minimum memory size.
2019-10-28 15:57:16 -07:00
Nick Lewycky
6410da9c24
Remove dead intrinsics.
2019-10-22 23:36:18 -07:00
Nick Lewycky
1a7f00f0af
Rewrite Min/Max to handle all cases correctly.
...
Fixes 545 spectest failures.
2019-10-03 18:19:12 -07:00
losfair
c7377a465f
Merge remote-tracking branch 'origin/master' into feature/llvm-osr
2019-08-21 15:49:25 -07:00
Nick Lewycky
f2077c204b
Implement fence correctly, atomic load/store as non-atomic.
...
Adds trap for misaligned accesses.
2019-08-19 10:51:14 -07:00
losfair
0e0573c73c
Merge remote-tracking branch 'origin/master' into feature/llvm-osr
2019-08-14 16:33:26 -07:00
Nick Lewycky
2f3c9c3e2f
Mark memory.size VM intrinsics as not modifying state, and throw.trap/breakpoint as functions which do not return.
2019-08-13 21:50:54 -07:00
Nick Lewycky
536f9813dc
Implement InternalEvent::Breakpoint in the llvm backend.
...
Enable now-working metering unit tests when run with the llvm backend.
2019-08-01 12:44:25 -07:00
losfair
9ed5094f86
Resolve semantics for more values.
2019-08-01 23:28:39 +08:00
Syrus
0dfa1f68a8
Formatted code
2019-07-31 23:51:12 -07:00
Syrus
a6461c3b14
Removed explicit hashbrown dependency
2019-07-31 23:18:38 -07:00
Nick Lewycky
931d556de1
Add support for internal fields.
2019-07-31 13:10:51 -07:00
Nick Lewycky
bdb1c4c44e
Fix inkwell assertion due to treating vector as float. Fix llvm backend fatal error due to missing support for fminimum/fmaximum.
2019-07-30 14:59:04 -07:00
losfair
0a7f95ee06
Allow a range of instruction offsets to be used in ip lookup.
2019-07-30 22:25:15 +08:00
Nick Lewycky
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
losfair
a14a8e4c50
Emit stack map at critical points.
2019-07-18 02:43:04 +08:00
Nick Lewycky
fdc13563b8
Initial implementation of SIMD in the LLVM backend.
2019-07-10 13:54:32 -07:00
Nick Lewycky
77afcea9dc
Add V128 stubs to allow LLVM backend to build again.
2019-07-10 13:48:12 -07:00
Nick Lewycky
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
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
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
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
b834b4ff36
Metering for LLVM.
2019-05-31 15:36:08 +08: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
losfair
e53d5a91ca
Remove transmutes.
2019-05-07 19:20:18 +08:00
Ivan Enderlin
b03980f8c9
fix(llvm-backend) Remove unused variables or functions.
2019-03-29 10:08:43 +01:00
Ivan Enderlin
76d26d97ac
fix(llvm-backend) Remove Intrinsics.ctx_ty
, CtxType.ctx_ty, and
.ctx_ptr_ty`.
2019-03-29 10:07:38 +01:00
Ivan Enderlin
a1ca7069af
fix(llvm-backend) Remove unused imports.
2019-03-29 10:03:40 +01:00
Lachlan Sneff
17eada53f3
feat(runtime) Get ready for tiering ( #257 )
...
* Add local_function field to context
* Add local call indirection to llvm
* local call indirection
* Fix vm test
* Fix cranelift local call indirection
* Fix unwinding on nightly
2019-03-08 15:15:16 -08:00
Lachlan Sneff
fe8f8a0132
Add illegal arithmetic runtime error
2019-03-04 19:56:02 -08:00
Lachlan Sneff
25c0cef5f7
Up to 1242 passing spectests
2019-03-04 15:51:45 -08:00
Lachlan Sneff
7ef2c0dece
Fix execute after free issue with llvm (and presumably cranelift?)
2019-03-04 14:41:56 -08:00