Repository navigation
JIT: Expand casts for unsealed exact-class candidates - #136308
Conversation
Co-authored-by: Copilot <[email protected]> Copilot-Session: 474803a8-11ce-496c-a351-ff85e990bedc
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
…mentations Co-authored-by: Copilot <[email protected]> Copilot-Session: 474803a8-11ce-496c-a351-ff85e990bedc
|
PTAL @MichalStrehovsky, copilot found no issues. This cast expansion logic was written by me, but I don't remember why I added that conservative check. Small size regressions in rt-rz as expected (cast expansion with multiple guesses is bigger than call to cast-helper). |
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
MichalStrehovsky
left a comment
There was a problem hiding this comment.
I'm starting to be scared of this code, we had many bugs. I guess it's early enough we can try!
|
/ba-g failure is #136386 |
I am not remembering any (at least on the JIT side). Here we just depend on ILC to give us exhaustive list of classes for given base. |
Yes the bugs were all in the whole program analysis. |
Fixes #136302.
Remove the redundant
isExactTypecheck on cast candidates returned bygetExactClasses. The API already supplies the complete set of possible runtime types, including base classes with subclasses in that set. Requiring each candidate to be sealed prevents NativeAOT from expanding these casts into method-table comparisons.