Uh oh!
There was an error while loading. Please reload this page.
Convert isExactType check to JIT/EE interface call - #97424
Conversation
The approximation of isExactType from class flags had false positives (correctness) and false negatives issues. Converting it to JIT/EE interface method fixes them both. Fixesdotnet#97134
ghost
commented
Jan 23, 2024
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsThe approximation of isExactType from class flags had false positives (correctness) and false negatives issues. Converting it to JIT/EE interface method fixes them both. Fixes #97134
|
jkotas
commented
Jan 23, 2024
cc @dotnet/jit-contrib |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
It's a coincidence, but in https://github.com/dotnet/runtime/pull/97387/files I currently have a failing test that fails because IsExactClass returns true for a class with [TypeIdentifier] and I assume this PR will fix it. The reason current jit's cast expansion logic is not hitting this issue becuase it doesn't try to expand CORINFO_HELP_ISINSTANCEOFANY for exact classes
Does |
jkotas
commented
Jan 23, 2024
It does not and it cannot not. |
jkotas
commented
Jan 23, 2024
The JIT approximation returned false for int[] as well. I agree that it is interesting to get jit-diff. |
EgorBo
commented
Jan 23, 2024
There is also |
Do you mean this place runtime/src/coreclr/jit/importer.cpp Lines 5483 to 5484 in d250dcc getExactClasses vs. isExactType do not use "exact" to mean the same thing.) |
EgorBo
commented
Jan 24, 2024
Yes, I meant that case - I agree it's ok since it checks isExact explicitly 👍
Agree, |
EgorBo
commented
Jan 24, 2024
EgorBo
commented
Jan 24, 2024
@jkotas an unrelated question: Currently, for varresult=(MySealedClass)obj;jit emits something like this: if(obj.GetType()==typeof(MySealedClass))result=obj;elseCORINFO_HELP_CHKCASTCLASS(obj,MySealedClass)
ret3 // always throw anywayCan we hit here the same issue we hit recently with version bubbles in R2R if |
jkotas
commented
Jan 24, 2024
Yes. IsEffectivelySealed for R2R returns true only if the type is in the same version bubble: |
All implementations return the same constant. Unlikely to be needed again.
jkotas
commented
Jan 24, 2024
/azp run runtime-coreclr outerloop, runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 2 pipeline(s). |
EgorBo
commented
Jan 24, 2024
No jit-diffs MihuBot/runtime-utils#228 (comment) |
EgorBo
commented
Jan 24, 2024
the build-in-progress jobs seem to stuck? 10h for the NativeAOT one |
jkotas
commented
Jan 24, 2024
These legs passed in previous runs. I do not think we need to retry. |
The approximation of isExactType from class flags had false positives (correctness) and false negatives issues. Converting it to JIT/EE interface method fixes them both.
Fixes#97134