Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove heaps from core Cranelift, push them into cranelift-wasm #5386

Merged
merged 42 commits into from
Dec 15, 2022
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5266ea9
cranelift-wasm: translate Wasm loads into lower-level CLIF operations
fitzgen Dec 5, 2022
4061db1
cranelift: Remove the `heap_{addr,load,store}` instructions
fitzgen Dec 6, 2022
900fe99
cranelift: Remove the `ir::Heap` entity from CLIF
fitzgen Dec 6, 2022
6c6cebb
Port basic memory operation tests to .wat filetests
fitzgen Dec 12, 2022
eb872f7
Remove test for verifying CLIF heaps
fitzgen Dec 12, 2022
2ed1d32
Remove `heap_addr` from replace_branching_instructions_and_cfg_predec…
fitzgen Dec 12, 2022
b8f0cdb
Remove `heap_addr` from readonly.clif test
fitzgen Dec 12, 2022
62e7773
Remove `heap_addr` from `table_addr.clif` test
fitzgen Dec 12, 2022
0c917b0
Remove `heap_addr` from the simd-fvpromote_low.clif test
fitzgen Dec 12, 2022
9b5d0e9
Remove `heap_addr` from simd-fvdemote.clif test
fitzgen Dec 12, 2022
feab8f4
Remove `heap_addr` from the load-op-store.clif test
fitzgen Dec 12, 2022
f6ba041
Remove the CLIF heap runtest
fitzgen Dec 12, 2022
5de2471
Remove `heap_addr` from the global_value.clif test
fitzgen Dec 12, 2022
2e8408e
Remove `heap_addr` from fpromote.clif runtests
fitzgen Dec 12, 2022
05f4b32
Remove `heap_addr` from fdemote.clif runtests
fitzgen Dec 12, 2022
540c53e
Remove `heap_addr` from memory.clif parser test
fitzgen Dec 12, 2022
b011628
Remove `heap_addr` from reject_load_readonly.clif test
fitzgen Dec 12, 2022
ee4fae1
Remove `heap_addr` from reject_load_notrap.clif test
fitzgen Dec 12, 2022
66c2e7d
Remove `heap_addr` from load_readonly_notrap.clif test
fitzgen Dec 12, 2022
5dcaeb6
Remove `static-heap-without-guard-pages.clif` test
fitzgen Dec 12, 2022
f417937
Remove `static-heap-with-guard-pages.clif` test
fitzgen Dec 12, 2022
70a54ef
Remove more heap tests
fitzgen Dec 12, 2022
3ba4240
Remove `heap_addr` from `simple-alias.clif` test
fitzgen Dec 12, 2022
05c69e5
Remove `heap_addr` from partial-redundancy.clif test
fitzgen Dec 12, 2022
131f377
Remove `heap_addr` from multiple-blocks.clif test
fitzgen Dec 12, 2022
0645532
Remove `heap_addr` from fence.clif test
fitzgen Dec 12, 2022
e725627
Remove `heap_addr` from extends.clif test
fitzgen Dec 12, 2022
18925d7
Remove runtests that rely on heaps
fitzgen Dec 12, 2022
84ad8bd
Add generated load/store `.wat` tests
fitzgen Dec 13, 2022
463fd93
Enable memory-related wasm features in `.wat` tests
fitzgen Dec 13, 2022
63140e9
Remove CLIF heap from fcmp-mem-bug.clif test
fitzgen Dec 13, 2022
95b968f
Add a mode for compiling `.wat` all the way to assembly in filetests
fitzgen Dec 13, 2022
422643d
Also generate WAT to assembly tests in `make-load-store-tests.sh`
fitzgen Dec 13, 2022
aca6520
cargo fmt
fitzgen Dec 13, 2022
0bf088a
Reinstate `f{de,pro}mote.clif` tests without the heap bits
fitzgen Dec 13, 2022
8dd762f
Remove undefined doc link
fitzgen Dec 13, 2022
36ef819
Remove outdated SVG and dot file from docs
fitzgen Dec 14, 2022
b93ffc2
Add docs about `None` returns for base address computation helpers
fitzgen Dec 14, 2022
d969082
Factor out `env.heap_access_spectre_mitigation()` to a local
fitzgen Dec 14, 2022
5a53cd0
Expand docs for `FuncEnvironment::heaps` trait method
fitzgen Dec 14, 2022
1cd66b5
Restore f{de,pro}mote+load clif runtests with stack memory
fitzgen Dec 14, 2022
e2b6cf5
Fix test expectation that referenced old heap setting
fitzgen Dec 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove heap_addr from reject_load_notrap.clif test
  • Loading branch information
fitzgen committed Dec 14, 2022
commit ee4fae12f87319c5574ecdb6fda7a2e6497c6138
6 changes: 2 additions & 4 deletions cranelift/filetests/filetests/licm/reject_load_notrap.clif
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ target x86_64
function %hoist_load(i32, i64 vmctx) -> i32 {
gv0 = vmctx
gv1 = load.i64 notrap aligned readonly gv0
heap0 = static gv1, min 0x1_0000, bound 0x1_0000_0000, offset_guard 0x8000_0000, index_type i32

block0(v0: i32, v1: i64):
v4 = iconst.i32 1
v5 = heap_addr.i64 heap0, v4, 0, 4
v5 = global_value.i64 gv1
jump block1(v0, v1)

block1(v2: i32, v3: i64):
Expand All @@ -34,11 +33,10 @@ block3(v9: i32):
; sameln: function %hoist_load(i32, i64 vmctx) -> i32 fast {
; nextln: gv0 = vmctx
; nextln: gv1 = load.i64 notrap aligned readonly gv0
; nextln: heap0 = static gv1, min 0x0001_0000, bound 0x0001_0000_0000, offset_guard 0x8000_0000, index_type i32
; nextln:
; nextln: block0(v0: i32, v1: i64):
; nextln: v4 = iconst.i32 1
; nextln: v5 = heap_addr.i64 heap0, v4, 0, 4 ; v4 = 1
; nextln: v5 = global_value.i64 gv1
; nextln: jump block1(v0, v1)
; nextln:
; nextln: block1(v2: i32, v3: i64):
Expand Down