-
Notifications
You must be signed in to change notification settings - Fork 786
[WIP] [opt] let OptimizeAddedConstants handle memory64 well #5043
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
Since it is wip MR, so i do not write unit test. If this patch accept, I will write more unit test |
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.
Thanks!
In addition to the comments below please also add a test. Perhaps in a new file, test/lit/passes/optimize-added-constants-memory64.wast
.
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
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
// /src/src/passes/OptimizeAddedConstants.cpp:242:15 looks like `value >=0` always true.
uint64_t value = literal.getInteger();
// Avoid uninteresting corner cases with peculiar offsets.
if (value >= 0 && value < PassOptions::LowMemoryBound) { |
5e6409e
to
7137875
Compare
@kripken In addition, could you give me a write permission? Because we will focus on binaryen and wasm, I would love to write more code for binaryen. Thanks in advance. |
Hi kripken, I found some of unit test failed, could you tell me how to run those tests in my local environment? thanks |
Hmm, the CI error looks unrelated to this PR. It's a closure error,
Likely that is due to @sbc100's recent changes on emscripten (CI here uses latest unstable emscripten). Does that sound likely @sbc100 ? @dongAxis In general though to run those tests you can look at About write access, I think the main issue was that github wouldn't run CI for you without someone approving it? That seems to have been fixed after your earlier commits that landed - I didn't need to manually run CI here today. I believe github requires manual approval for CI only for people that haven't committed to a repo. |
Yup that sounds expected. I guess we should either fix the warnings of build with |
ok thanks |
Co-authored-by: Alon Zakai <[email protected]>
2092ce9
to
cc78ca8
Compare
About memory64 performance, this PR fixes one important issue, and there are likely more places we just support 32-bit integers but not 64. I bet in OptimizeInstructions for example we have such issues. One way to find them might be to compile the same code in wasm32 and wasm64 and just look at the code side by side - anywhere the wasm64 code is larger is worth investigating. cc @sbc100 |
hi all,
But OptimizeAddedConstants dose not handle well, so I use this patch to fix that.
Sample wasm will attached.
Best Regards
Yifeng