[SR-1103] Redundant metadata accesses when invoking ObjC protocol methods #43716
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
good first issue
Good for newcomers
IRGen
LLVM IR generation
Additional Detail from JIRA
md5: 970c1d7db6290aee45b5ecc9fd1e9432
Issue Description:
Protocol methods are modeled as functions generic on Self, so IRGen tries to get the type metadata to satisfy the formal type parameter, even though it's not used for an ObjC or C protocol method:
The call is marked
readnone
so gets optimized away, but we shouldn't emit it at all for the sake of unoptimized code.The text was updated successfully, but these errors were encountered: