-
Notifications
You must be signed in to change notification settings - Fork 757
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
Stack switching: fix some optimization passes #7271
base: main
Are you sure you want to change the base?
Conversation
test/lit/passes/stack_switching.wast
Outdated
@@ -0,0 +1,163 @@ | |||
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. | |||
;;RUN: wasm-opt -all -O3 -Oz %s -S -o - | filecheck %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be able to break this up into targeted tests for the individual fixed optimization passes? Also, the new test files should be added to the list of ignored tests in scripts/fuzzing.py until scripts/fuzz_opt.py can run cleanly without that.
c067464
to
19e57a7
Compare
Update the type of the blocks that are targets of the handlers of resume and resume_throw instructions.
We were incorrectly comparing a tag name with block types.
19e57a7
to
50d6418
Compare
assert(params.size() > 0); | ||
Type cont = params[params.size() - 1]; | ||
assert(cont.isContinuation()); | ||
type = cont.getHeapType().getContinuation().type.getSignature().params; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhil Does this look correct to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it looks right to me. The last parameter of a switch-continuation must be a continuation type. This argument is synthetic in the sense that it is provided by switch
rather than the programmer.
Co-authored-by: Max Graey <maxgraey@gmail.com>
This continues #7041 by adapting the optimizations passes to work with the stack switching instructions.