-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Improve morphing of comparisons #54204
Merged
BruceForstall
merged 7 commits into
dotnet:main
from
SingleAccretion:Compare-Peep-Morph
Sep 16, 2021
Merged
Improve morphing of comparisons #54204
BruceForstall
merged 7 commits into
dotnet:main
from
SingleAccretion:Compare-Peep-Morph
Sep 16, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dotnet-issue-labeler
bot
added
the
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
label
Jun 15, 2021
cc @sandreenko |
PTAL @dotnet/jit-contrib |
@sandreenko @dotnet/jit-contrib PTAL. |
terrajobst
added
the
community-contribution
Indicates that the PR has been added by a community member
label
Jul 19, 2021
sandreenko
approved these changes
Jul 23, 2021
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 for post 6.0 merge, thanks @SingleAccretion
SingleAccretion
force-pushed
the
Compare-Peep-Morph
branch
from
August 19, 2021 17:37
c0d1d49
to
1c8b99a
Compare
I have rebased the change to resolve a conflict and applied some cosmetic tweaks (no functional changes). Edit: one more rebase to fix one more conflict. |
Replace LE_UN/GT_UN(OP, int/long.MaxValue) with GE/LT(OP, 0) as that generates smaller code on all targets.
So that it is next to fgOptimizeEqualityComparisonWithConst. Purely cosmetic change.
SingleAccretion
force-pushed
the
Compare-Peep-Morph
branch
from
September 5, 2021 20:47
63673f2
to
ea26755
Compare
BruceForstall
approved these changes
Sep 16, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
community-contribution
Indicates that the PR has been added by a community member
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A couple changes to this part of
fgMorphSmpOp
:1) Refactored post-order morphing of
GT_LE\GT_LT\GT_GE\GT_GT
into its own method (verified no-diff).2) Made the new method handle
GT_CNS_LNG
.3) Fixed a missed
gtIsActiveCSE_Candidate
condition.4) Added a new optimization (primarily code size for x86/x64, but also allows to omit one
mov
on ARM/ARM64).Diffs for this change (improvements on 32 bit are both because of the new optimization and
GT_CNS_LNG
handling, only regression on ARM is due to different register allocation):Windows x64
Windows x86
Linux ARM64
Linux ARM