-
Notifications
You must be signed in to change notification settings - Fork 313
WIP: replace register-alloc with purely stack-based translation #1512
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
Draft
Robbepop
wants to merge
310
commits into
main
Choose a base branch
from
rf-stack-based-translation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3d12a1f
to
01dceaa
Compare
74cea23
to
90148db
Compare
c8fedbe
to
5f7b15e
Compare
90c0633
to
9710ce5
Compare
49c874b
to
f5593b5
Compare
5d084d8
to
1929b49
Compare
2234c94
to
16a3212
Compare
This was referenced Jul 1, 2025
0828de7
to
a180c75
Compare
Reachability was not calculated properly for ifs where either then or else block where known to be reachable at compile-time.
This is going to be useful for Wasm br_table translation targets.
This is going to be useful for translation of Wasm's br_table.
This is given due to prior checks asserting that fusion must succeed at this point.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #1484.
ToDo
{i32,i64,f32,f64}.const
return
,br_if
,br
,unreachable
,nop
local.{get,set,tee}
i{32,64}.{popcnt,clz,ctz}
i{32,64}.{add,sub,mul,div_s,div_u,rem_s,rem_u,shl,shr_s,shr_u,rotl,rotr}
f{32,64}.{abs,neg,ceil,floor,nearest,trunc,sqrt}
f{32,64}.{add,sub,mul,div,min,max,copysign}
global.{get,set}
memory.{size,grow,init,copy,fill}
&data.drop
table.{size,grow,init,copy,fill}
&elem.drop
memory.load
memory.store
call
call_indirect
return_call
return_call_indirect
select
ref.{func,null,is_null}
br_table
simd
wide-arithmetic
fuse_local_set/tee
fuse_eqz
fuse_nez
fuse_cmp_branch
fuse_cmp_select
local
operands.(reinterpret (local $n))
instruction translation by not requiring acopy
instruction.(ref.is_null (local $n))
instruction translation by not requiring acopy
instruction.wasm_br_if
wasm_br_if
,wasm_return_call
,wasm_return_call_indirect
wasm_stack
,wasm_return_call_indirect
self.range.start <= self.range.end
wasm_names
,wasm_return_call
,wasm_return_call_indirect
,wasm_float_exprs
,wasm_imports
wasm_return_call
,wasm_return_call_indirect
wasm_loop
,wasm_block
wasm_forward:17:1
,wasm_fac:102:1
I64(7034535277573963776)
but foundI64(0)
wasm_fac:102:1
I32(1)
but foundI32(0)
wasm_forward:18:1
matches!(condition.ty(), ValType::I32, | ValType::I64)
wasm_call_indirect
I64(0)
but foundI64(4607182418800017408)
wasm_func:260:1
I64(-1)
but foundI64(0)
wasm_endianness:148:1