-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Remove O1K_VALUE_NUMBER #101894
Remove O1K_VALUE_NUMBER #101894
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
1ea7413
to
d0d23d1
Compare
PTAL @AndyAyersMS @jakobbotsch @dotnet/jit-contrib |
Does it make sense to assert non-null for both the byref value and the base value? I suppose the issue is on the checking side we're not doing the same add destructuring (which likely is somewhat reasonable, we probably do a lot more checking/searching then generating). Looking at the removed code I am surprised it has to check for chains of adds. Does that mean VN is producing VN func trees of adds -- I would expect it ought to be folding up all the constant offsets into one? That would make it simpler to find the byref base as it should be right there (and given canonical commutation, always be say arg0.). |
@AndyAyersMS My initial impl did exactly that but it's extra assertions and the benifts were small, Do you mind if I try again (with help of VN this time) to add assertions for base separately? So we can see actual diffs + TP impact |
Yeah go ahead and give it a try. |
Waiting for an approval then 🙂 |
Ah, you mean in a follow-up PR... Sure |
Potential regressions:
|
I am seeing some nice diffs in libraries.pmi from this change.
My understanding that when we try to create an assertion for
lcl != null
(wherelcl
is aTYP_BYREF
) - we try to find the underlyingTYP_REF
in thatTYP_BYREF
(e.g.BYREF = TYP_REF + smallCns
) and then create aO1K_VALUE_NUMBER
assertion for thatTYP_REF
or bail out.My PR removes that assertion completely so we just create "byref lcl != null"
O1K_LCLVAR
assertion without trying to find the TYP_REF. There are a few regressions, but mostly improvements.E.g. it helps to fold things like: