-
Notifications
You must be signed in to change notification settings - Fork 745
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
emited text contains tuple instructions even when using --intrinsic-lowering #7028
Comments
Tuples are not intrinsic functions, they are a normal part of the IR, so that pass does not affect them. You can print StackIR, |
Thanks! |
Acutally, when using |
Hmm, yeah, I suppose it doesn't remove them entirely, e.g. this (module
(type $0 (func (result i32 f64)))
(func $foo (type $0) (result i32 f64)
(tuple.make 2
(i32.const 42)
(f64.const 3.14159)
)
)
) is printed as this Stack IR: (module
(type $0 (func (result i32 f64)))
(func $foo (type $0) (result i32 f64)
i32.const 42
f64.const 3.14159
tuple.make 2
)
) This is in the flat format that doesn't need tuples, so we could skip printing |
Yes, it would be nice to get rid of them. I'm trying to run Binaryen generated file in the reference interpreter and in Owi and it complicates things. |
If this is for manual debugging, you can ignore the |
We could print the tuple instructions as comments in Stack IR, perhaps. |
@zapashcanon You may also want to look at other tools for printing the wasm, such as wasm-tools or v8's wami. |
I think this would solve the issue for me. |
Oh, it looks like Stack IR still contains Your best bet for now would be to have Binaryen emit a binary module, then use a separate tool (probably https://github.com/bytecodealliance/wasm-tools) to disassemble it back to text. |
Hi,
I'm running Binaryen with
-S
(because I'm using a combination of proposals not handled by other tools yet) in order to debug some code. I added the--intrinsic-lowering
flag, hoping it would remove the tuples and use locals or whatever instead but it seems this is not the case.Is there a way to get rid of them in the text format generated by Binaryen? Binaryen is able to produce a binary file so what I'd like is to get the equivalent text format.
This is related to #6016 but it's really not helping me.
Thanks!
The text was updated successfully, but these errors were encountered: