-
Notifications
You must be signed in to change notification settings - Fork 5k
JIT: Introduce O1K_VN #112889
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
JIT: Introduce O1K_VN #112889
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
/azp run runtime-coreclr libraries-pgo, runtime-coreclr jitstress |
Azure Pipelines successfully started running 2 pipeline(s). |
PTAL @jakobbotsch @dotnet/jit-contrib the fix that we've discussed in Discord. I'll see if I can move more LCLVAR into VN in the future. Diffs All failures are #112856 |
@@ -787,6 +791,10 @@ void Compiler::optPrintAssertion(AssertionDsc* curAssertion, AssertionIndex asse | |||
vnStore->vnDump(this, curAssertion->op1.bnd.vnLen); | |||
printf("]"); | |||
} | |||
else if (curAssertion->op1.kind == O1K_VN) | |||
{ | |||
printf("[" FMT_VN "]", curAssertion->op1.vn); |
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.
Use vnStore->vnDump
?
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.
will address in #110171
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. It would make sense to me if we changed range check to actually get the constant from the assertion now:
runtime/src/coreclr/jit/rangecheck.cpp
Lines 752 to 759 in e6c5bb4
else if (curAssertion->IsConstantInt32Assertion()) | |
{ | |
if (curAssertion->op1.vn != normalLclVN) | |
{ | |
continue; | |
} | |
int cnstLimit = m_pCompiler->vnStore->CoercedConstantValue<int>(curAssertion->op2.vn); |
Agree, I'll address that in #110171 that I'll rebase after this lands |
Fixes a bug that caused #112872 revert
O1K_ARR_BND
used to have a complex semantics - it supported different kinds of asserts, now it's always used only withOAK_NO_THROW
kind.The newly introduced
O1K_VN
is sort of similar toO1K_LCLVAR
but works for any VN.The change should actually be an improvement, because previously,
O1K_ARR_BND
with ==/!= was a bit conservative on when to create such an assertion. Possible regressions from "too many assertions".