-
Notifications
You must be signed in to change notification settings - Fork 747
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
SimplifyGlobals: Apply constant globals to segment offsets #6226
Conversation
(drop | ||
(global.get $use-defined) | ||
) |
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.
Maybe use $use-imported
too as a comparison?
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.
Sounds good, done.
;; CHECK: (data $dropped "hello, world!") | ||
(data $dropped "hello, world!") |
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.
Is this relevant to this PR?
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.
It's a segment without an offset, so the pass has nothing to do there but also it should not error on it (there is a nullptr for the offset). I added a comment to clarify.
…ly#6226) We already applied such globals to other globals, but can do the same to offsets of data and element segments. Suggested in WebAssembly#6220
We already applied such globals to other globals, but can do the same to offsets
of data and element segments.
Suggested in #6220 (comment)