-
Notifications
You must be signed in to change notification settings - Fork 397
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
Refactor Binary Identity Simplification Macro #7195
Refactor Binary Identity Simplification Macro #7195
Conversation
2c1fda2
to
f4e05e8
Compare
It looks like there are some build errors on Windows and macOS.
|
c8a8d5d
to
092686b
Compare
@hzongaro ready for another look! |
092686b
to
b901254
Compare
@a7ehuo, I haven't managed to spend the time needed to review this pull request properly. May I ask you to review? |
@jmesyou Does the second commit almost rewrite the core change made in the first commit? It might be hard to review since any comment added to the first commit might not be applicable any more after the second commit. And some of the comments might need to refer to the code in the first commit but the suggestion would apply to the second commit since the structure of the design has been changed in the second commit. Could the two commits be squashed into one to make it easier for review? Thank you! Could the commit comment and the PR description be updated to reflect more accurately on the content since this PR doesn't solve the whole issue but it addresses 2 of the 3 macros mentioned in the issue #7166
|
0664dc2
to
6795c73
Compare
@a7ehuo I squashed the commits together. Hopefully that will make the PR and changes easier to read. I've also updated the |
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.
Thank you very much for making this change to clean up the code and squashing the two commits! I just have some minor comments.
Meanwhile could the description of this PR be updated with the latest commit message? I'd also recommend running some regression tests such as sanity.functional, extended.functional, or sanity.system, sanity.openjdk etc. on different platforms with this change to make sure there is no regression.
d1827d5
to
cbfa9ff
Compare
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.
Thank you very much for making the update @jmesyou! I just have some minor follow up comments.
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 for making the update @jmesyou! I have two comments as below
e9d2b08
to
0152754
Compare
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.
Thank you for the update!
LGTM. I assume you're running some regression tests (sanity.functional, extended.functional, sanity.openjdk etc). Once you confirm the regression tests complete successfully and all the commits are squashed into one. I'll approve the PR. Thanks again!
0152754
to
060d4ca
Compare
060d4ca
to
45ea2ab
Compare
Internal build 21052 is passing and commits squashed |
45ea2ab
to
217a709
Compare
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 . Thank you very much for making the update @jmesyou!
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 think the changes look good. I have a number of cosmetic comments, mostly on the existing code.
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 for the updates. All your changes look good - just one further comment. Once addressed, you can go ahead and squash the commits. Thanks!
11dac46
to
0eb4905
Compare
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.
Looks good. Thanks!
Jenkins build all |
It looks like the z/OS and AIX compilers are having trouble with part of these changes.
|
This commit cleans up the BINARY_IDENTITY_OP and BIANRY_IDENTITY_OR_ZERO macros and replaces them with inline equivalents by implementing a struct to replace template instantions of the functions tryAndSimplifyBinaryOp*. This change limits the number of template instantiations potential call sites have to create as well as abstracts some captured variables inside the struct to minimize the number of arguments passed to actual calls. A closure is emulated by the struct. Through escape analysis, scalar replacement and inlining, the overhead of creating this struct should be minimal on -O3 Related: eclipse-omr#7166 Signed-off-by: James You <[email protected]>
0eb4905
to
5030f48
Compare
@hzongaro had to rebase and force push to run the Jenkins pipeline, sorry about that 😅 |
Jenkins build all |
This commit cleans up the BINARY_IDENTITY_OP and
BIANRY_IDENTITY_OR_ZERO macros and replaces them
with inline equivalents by implementing a struct to replace template
instantions of the functions tryAndSimplifyBinaryOp*.
This change limits the number of template instantiations
potential call sites have to create as well as abstracts
some captured variables inside the struct to minimize
the number of arguments passed to actual calls.
A closure is emulated by the struct.
Through escape analysis, scalar replacement and inlining,
the overhead of creating this struct should be minimal
on -O3
Related: #7166
Signed-off-by: James You [email protected]