-
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
Customize the limit of MaxDataSegments #7285
base: main
Are you sure you want to change the base?
Conversation
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.
I agree a python unit test is not needed, but let's add a simple lit test. We are in the process of moving more testing to lit.
See e.g. test/lit/passes/strip-eh.wast
for an example lit test to base off of. That directory is the right place for it.
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.
lgtm otherwise
@@ -22,7 +22,13 @@ namespace wasm { | |||
|
|||
struct LimitSegments : public Pass { |
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.
Please add a comment documenting this flag, similar to
binaryen/src/passes/Asyncify.cpp
Lines 236 to 240 in 19dd23d
// --pass-arg=asyncify-asserts | |
// | |
// This enables extra asserts in the output, like checking if we put in | |
// an unwind/rewind in an invalid place (this can be helpful for manual | |
// tweaking of the only-list / remove-list, see later). |
Related to #7229.
The custom limit can be passed by doing
--pass-arg=limit-segments@1024
.I didn't commit a unit test because I don't think it's necessary to add one, but I wrote one to test everything works: