-
Notifications
You must be signed in to change notification settings - Fork 825
[EH] Support CFGWalker for new EH spec #6235
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
Conversation
This adds support `CFGWalker` for the new EH instructions (`try_table` and `throw_ref`). `CFGWalker` is used by many different passes, but in the same vein as WebAssembly#3494, this adds tests for `RedundantSetElimination` pass. `rse-eh.wast` file is created from translated and simplified version of `rse-eh-old.wast`, but many tests were removed because we don't have special `catch` block or `delegate` anymore.
|
(please fuzz this before landing) |
Co-authored-by: Alon Zakai <alonzakai@gmail.com>
I don't think we can fuzz new EH yet because the optimization pipeline is not supported yet. On that front, I should've included this new test to the no-fuzz list... Will do that. |
| ;; Unlike nested-try_table1, the exception may not be caught by the inner | ||
| ;; catch, so the local.set may not run. So this should NOT be dropped. |
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.
This is because the CFG builder does not consider tags when creating control flow edges, right? In reality the exception would always be caught here.
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.
Yeah, good point. I'll make a copy of this which throws with a different tag, and put a TODO on this one.
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.
Sorry, it shouldn't be a different tag, in which case it is always not gonna be caught. I'll replace the throw with a call, which we don't know what it will throw.
This adds support `CFGWalker` for the new EH instructions (`try_table` and `throw_ref`). `CFGWalker` is used by many different passes, but in the same vein as WebAssembly#3494, this adds tests for `RedundantSetElimination` pass. `rse-eh.wast` file is created from translated and simplified version of `rse-eh-old.wast`, but many tests were removed because we don't have special `catch` block or `delegate` anymore.
This adds support
CFGWalkerfor the new EH instructions (try_tableandthrow_ref).CFGWalkeris used by many different passes, but in the same vein as #3494, this adds tests forRedundantSetEliminationpass.rse-eh.wastfile was created from translated and simplified version ofrse-eh-old.wast, but many tests were removed because we don't have specialcatchblock ordelegateanymore.