-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Refactor fgMorphCast
#59713
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 fgMorphCast
#59713
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsWith #55186 merged, I was looking to take advantage of Also some comments have been added. Diffs for this change: pending.
|
d8180bc to
eb37a03
Compare
Split it into the part that does pre-order transforms and the part that does post-order optimizations. Rename the pre-order part to "fgMorphExpandCast" and let "fgMorphSmpOp" do the morphing of operands and optimization. Just one diff for this commit: "gtFoldExprConst" does not retain the types of handles, thus LSRA was not seeing "long" and "byref" constant integers with the same values as equivalent and did not reuse the register.
These cases are now covered by "fgMorphSmpOp".
eb37a03 to
f9f3011
Compare
So that it works well for casts.
There are diffs for this commit in the ILGEN methods,
mostly positive, but some are regressions.
The regressions fall into 2 buckets:
1. The new code creates overflow helper blocks for casts
before propagating comma throws, thus leaving them
around, dead. This is a problem in general and should
be solved by moving the helper insertion later.
2. The new code doesn't propagate comma throws after global
morph for casts. This is is by design, as the throw
propagation does not work well with VNs (and CSE).
The improvements are due to new code setting "fgRemoveRestOfBlock"
for comma throws originating from casts.
f9f3011 to
2a84e1d
Compare
|
@dotnet/jit-contrib |
|
/azp run runtime-coreclr jitstress |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Stress failures appear to be #59794. |
BruceForstall
left a comment
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. Thanks for the contribution!
With #55186 merged, I was looking to take advantage of
IntegralRangeinfgMorphCast, but it turned out some refactoring was first in order, mainly to get rid of questionable & duplicated code. So that's what this PR is about. See the commit messages for the description of the changes.Also some comments have been added.
Diffs for this change:
win-x64,win-x86,linux-arm.