Relative issue: #79871
My blogpost explained this issue and the fix solution (may be tedious): https://wezzard.com/post/2025/03/when-the-swift-compiler-deleted-code-in-stdlib-9067
@swift-ci please test
Hi, folks. I've just learned that the practice of submitting pull requests in the Swift repository is to merge to the main branch instead of a specific releasing branch. I've updated the targeting branch of the PR and fixed a build issue introduced in the tidying up of the commit history. Could anyone help to trigger the @swift-ci to test my commit?
@swift-ci please test
Thanks for fixing this!
Thanks, lgtm!
@swift-ci test
Hi folks! The tests have completed. I think it's time to complete the code review. Do you have any further advice for this pull request?
Plus, since the reviewers list is incredibly long, I wanna make sure that if this pull request really need to involve so much reviewers? Or we just need to involve those reviewers with the shield icon? Reviewers without the shield icon might be mis-involved because I was originally base with release/6.1 but targeted to the main branch. Now the base and the target branch are both fixed to the main
branch and matched.
Or we just need to involve those reviewers with the shield icon?
It's fine if a single reviewer (who understands the code) gives her/his thumbs up.
But it's always a good idea to add a few reviewers in case anyone else wants to take a look.
Login to write a write a comment.
The
unchecked_ref_cast
is designed to be able to cast betweenOptional<ClassType>
andClassType
. We need to handle these cases by checking if the type is optional and adjust the path accordingly.The absence of this process causes the escape analysis for the operand of the
load
instruction returns non-escaping if there is aunchecked_ref_cast
casting from an optional class type to a non-optional class type. Since this the implicit optional-wrapping does not reflect on thepath
.This further makes the redundant load elimination pass to eliminate this
load
though there is a function with side-effects applied right before theload
instruction. Since the function apply effect computation in the alias analysis only returns the effects of the function itself if the operand of theload
instruction is not escaped.