-
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
JIT: Late expansion for casts #97075
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
/azp run runtime-coreclr pgo, runtime-coreclr libraries-pgo, runtime-coreclr pgostress |
Azure Pipelines successfully started running 3 pipeline(s). |
@jakobbotsch @dotnet/jit-contrib PTAL. Diffs. There are few things in the diffs:
Will move more casts to this phase from importer (all of them hopefully). For now only recently introduced profiled casts are handled. |
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
…o late-cast-expansion
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, but looks like CI is a bit unhappy.
/azp run runtime-coreclr pgo, runtime-coreclr libraries-pgo |
Azure Pipelines successfully started running 2 pipeline(s). |
Ah, I broke the control flow a bit - nullcheckBb used to jump straight to the use block without assigning Instead, I now do: Case 1:tmp = obj;
if (tmp != null)
{
if (tmp.pMT != likelyClass)
tmp = helperCall
else
no-op; // this block will be collected
}
use(tmp); Case 2 (likelyClass is known to never pass the type check):tmp = obj;
if (tmp != null)
{
if (tmp.pMT != likelyClass)
tmp = helperCall
else
tmp = null;
}
use(tmp); I can avoid the initial |
Failure is #97103 |
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Move cast expansion from importer to a late phase. For now, only for profiled isinst.
Closes #96837
Contributes to #84025