swiftlang/swift

[SR-6889] [IRGen Opportunity] Use argmemonly for runtime functions

オープン

#49,438 opened on 2018/02/01

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Swift (10,719 件のフォーク)batch import
compilergood first issueimprovement

Repository metrics

Stars
 (69,989 個のスター)
PR merge metrics
 (平均マージ 8d 17h) (30d で 510 merged PRs)

説明

Previous ID SR-6889
Radar None
Original Reporter @aschwaighofer
Type Improvement
Votes 0
Component/s Compiler
Labels Improvement, StarterBug
Assignee None
Priority Medium

md5: 050d922fc6f6b8f37d1f70d51229bf7b

Issue Description:

It should be possible to mark some of our runtime functions with argmemonly readonly as they receive their type arguments indirectly via an array of type arguments.

I tried this in https://github.com/apple/swift/pull/14310 but tests failed. I did not have time to investigate why.

I mentioned that if that following situation in some form or another this annotation is not legal:

Type *args[5];
pointer->field = // inlined initialization
arg[1] = pointer
argmemonly(args)

However, we believe that this situation should? not arise. It might be worth investigating the failures.

コントリビューターガイド